This is an automated email from the ASF dual-hosted git repository.

casaroli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 1b0691e870d include/nuttx: Map the GCC asm keyword spellings for the 
TASKING compiler.
1b0691e870d is described below

commit 1b0691e870dfb0ceb3035b51a562fe4f3d7f2cdc
Author: zhangyuan29 <[email protected]>
AuthorDate: Fri Oct 30 21:44:06 2026 +0800

    include/nuttx: Map the GCC asm keyword spellings for the TASKING compiler.
    
    The TASKING VX-toolset accepts __asm, asm and the __asm volatile
    sequence, but neither __asm__ nor __volatile__ nor the asm volatile
    sequence.  The sources that use the GCC spellings, e.g. the tricore
    hwdebug support, therefore fail to compile with a syntax error.
    Redirect the double underscore spellings to __asm and plain volatile
    in the TASKING branch of compiler.h.  The GNU and LLVM builds are
    unaffected: the block is guarded by __TASKING__.
    
    Signed-off-by: zhangyuan29 <[email protected]>
---
 include/nuttx/compiler.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index 34d17a180eb..b9fbd1afa4d 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -1373,6 +1373,15 @@
 
 #elif defined(__TASKING__)
 
+/* Map the GCC keyword spellings: the TASKING VX-toolset accepts
+ * __asm, asm and the __asm volatile sequence, but neither __asm__
+ * nor __volatile__ nor the asm volatile sequence, so redirect the
+ * double underscore spellings to __asm and plain volatile.
+ */
+
+#  define __asm__       __asm
+#  define __volatile__  volatile
+
 /* Define these here and allow specific architectures to override as needed */
 
 #  define CONFIG_HAVE_FLOAT             1

Reply via email to