aboutsummaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/include/nuttx/compiler.h')
-rw-r--r--nuttx/include/nuttx/compiler.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h
index d74fcbea0..6ad51ad0f 100644
--- a/nuttx/include/nuttx/compiler.h
+++ b/nuttx/include/nuttx/compiler.h
@@ -87,11 +87,16 @@
# define packed_struct __attribute__ ((packed))
-/* GCC does not support the reentrant or naked attributes */
+/* GCC does not support the reentrant attribute */
# define reentrant_function
-# define naked_function
+/* The naked attribute informs GCC that the programmer will take care of
+ * the function prolog and epilog.
+ */
+
+# define naked_function __attribute__ ((naked,no_instrument_function))
+
/* The inline_function attribute informs GCC that the function should always
* be inlined, regardless of the level of optimization. The noinline_function
* indicates that the function should never be inlined.
@@ -191,8 +196,10 @@
/* GCC supports both types double and long long */
-# define CONFIG_HAVE_DOUBLE 1
# define CONFIG_HAVE_LONG_LONG 1
+# define CONFIG_HAVE_FLOAT 1
+# define CONFIG_HAVE_DOUBLE 1
+# define CONFIG_HAVE_LONG_DOUBLE 1
/* Structures and unions can be assigned and passed as values */
@@ -255,7 +262,7 @@
* external RAM.
*/
-#if defined(__z80) || defined(__gbz80)
+#if defined(__SDCC_z80) || defined(__SDCC_z180) || defined(__SDCC_gbz80)
# define FAR
# define NEAR
# define CODE
@@ -295,7 +302,9 @@
/* SDCC does not support type long long or type double */
# undef CONFIG_HAVE_LONG_LONG
+# define CONFIG_HAVE_FLOAT 1
# undef CONFIG_HAVE_DOUBLE
+# undef CONFIG_HAVE_LONG_DOUBLE
/* Structures and unions cannot be passed as values or used
* in assignments.
@@ -398,8 +407,10 @@
* simply do not support long long or double.
*/
-# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_LONG
+# define CONFIG_HAVE_FLOAT 1
+# undef CONFIG_HAVE_DOUBLE
+# undef CONFIG_HAVE_LONG_DOUBLE
/* Structures and unions can be assigned and passed as values */
@@ -433,9 +444,11 @@
# undef CONFIG_LONG_IS_NOT_INT
# undef CONFIG_PTR_IS_NOT_INT
# undef CONFIG_HAVE_INLINE
-# define inline
+# define inline 1
# undef CONFIG_HAVE_LONG_LONG
+# define CONFIG_HAVE_FLOAT 1
# undef CONFIG_HAVE_DOUBLE
+# undef CONFIG_HAVE_LONG_DOUBLE
# undef CONFIG_CAN_PASS_STRUCTS
#endif