diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-11 20:31:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-11 20:31:36 +0000 |
commit | bec5afdfb8ac3ef9abf83433f09bc711951479f1 (patch) | |
tree | b5b62d62fe4c8eb9761abb6dd697784572e425bb /nuttx/include | |
parent | 86afffb7b3441d1ac33e5b82136bd58c3b0e8a97 (diff) | |
download | px4-nuttx-bec5afdfb8ac3ef9abf83433f09bc711951479f1.tar.gz px4-nuttx-bec5afdfb8ac3ef9abf83433f09bc711951479f1.tar.bz2 px4-nuttx-bec5afdfb8ac3ef9abf83433f09bc711951479f1.zip |
Fixes for z8 compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@669 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/compiler.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 7183288cb..d14f816c0 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -59,9 +59,8 @@ /* Attributes * - * GCC supports weak symbols which can be used to reduce - * code size because unnecessary "weak" functions can be - * excluded from the link. + * GCC supports weak symbols which can be used to reduce code size because + * unnecessary "weak" functions can be excluded from the link. */ # ifndef __CYGWIN__ @@ -77,21 +76,20 @@ # define weak_const_function #endif -/* The noreturn attribute informs GCC that the function will - * not return. - */ +/* The noreturn attribute informs GCC that the function will not return. */ # define noreturn_function __attribute__ ((noreturn)) -/* The packed attribute informs GCC that the stucture elements - * are packed, ignoring other alignment rules. +/* The packed attribute informs GCC that the stucture elements are packed, + * ignoring other alignment rules. */ # define packed_struct __attribute__ ((packed)) -/* GCC does not support the reentrant attribute */ +/* GCC does not support the reentrant or naked attributes */ # define reentrant_function +# define naked_function /* GCC has does not use storage classes to qualify addressing */ @@ -158,6 +156,10 @@ # define noreturn_function # define packed_struct +/* SDCC does support "naked" function s*/ + +# define naked_function __naked + /* The reentrant attribute informs SDCC that the function * must be reentrant. In this case, SDCC will store input * arguments on the stack to support reentrancy. @@ -249,10 +251,11 @@ # define weak_function # define weak_const_function -/* The Zilog compiler does not support the noreturn or packed attributes */ +/* The Zilog compiler does not support the noreturn, packed, or naked attributes */ # define noreturn_function # define packed_struct +# define naked_function /* The Zilog compiler does not support the reentrant attribute */ @@ -317,6 +320,8 @@ # define noreturn_function # define packed_struct # define reentrant_function +# define naked_function + # define FAR # define NEAR |