-->
Page 1 of 1

Q: arch and model specific defines

PostPosted: Fri Nov 14, 2014 1:17 pm
by strolch
What are the model and architecture specific, buildin defines in gcc?
Like "_avr_" or "_arm_" on other architectures?

Re: Q: arch and model specific defines

PostPosted: Fri Nov 14, 2014 3:08 pm
by jcmvbkbc
From the gcc/config/xtensa/xtensa.h:

Code: Select all/* Target CPU builtins.  */
#define TARGET_CPU_CPP_BUILTINS()                                       \
  do {                                                                  \
    builtin_assert ("cpu=xtensa");                                      \
    builtin_assert ("machine=xtensa");                                  \
    builtin_define ("__xtensa__");                                      \
    builtin_define ("__XTENSA__");                                      \
    builtin_define (TARGET_WINDOWED_ABI ?                               \
                    "__XTENSA_WINDOWED_ABI__" : "__XTENSA_CALL0_ABI__");\
    builtin_define (TARGET_BIG_ENDIAN ? "__XTENSA_EB__" : "__XTENSA_EL__"); \
    if (!TARGET_HARD_FLOAT)                                             \
      builtin_define ("__XTENSA_SOFT_FLOAT__");                         \
  } while (0)


There are no model-specific builtins, you can get them from the overlay files.