diff options
author | sh <sh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-04-07 07:02:07 +0000 |
---|---|---|
committer | sh <sh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-04-07 07:02:07 +0000 |
commit | a568a3f7e458c8bcbc9e5bbdc3c67731b404a5c5 (patch) | |
tree | 3bd9dd88db3a9c40faa16aed7fab1717ee67dac5 /gcc/config/arm | |
parent | 47ad90e7204eb084cad1b9f9d1e41f76cf96983d (diff) | |
download | gcc-a568a3f7e458c8bcbc9e5bbdc3c67731b404a5c5.tar.gz |
ARM: Introduce ARM_DEFAULT_SHORT_ENUMS
Allow targets to define the default for the short enums option.
gcc/
* config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
definition.
* config/arm/arm.c (arm_default_short_enums): Use
ARM_DEFAULT_SHORT_ENUMS.
* config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 3 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 6 | ||||
-rw-r--r-- | gcc/config/arm/rtems.h | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 931c72d46f5..a9b61a33942 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -26549,12 +26549,11 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, return mode; } -/* AAPCS based ABIs use short enums by default. */ static bool arm_default_short_enums (void) { - return TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX; + return ARM_DEFAULT_SHORT_ENUMS; } diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 4dab73d37be..275004af938 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -343,6 +343,12 @@ extern int arm_fpu_attr; #define ARM_DEFAULT_ABI ARM_ABI_APCS #endif +/* AAPCS based ABIs use short enums by default. */ +#ifndef ARM_DEFAULT_SHORT_ENUMS +#define ARM_DEFAULT_SHORT_ENUMS \ + (TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX) +#endif + /* Map each of the micro-architecture variants to their corresponding major architecture revision. */ diff --git a/gcc/config/arm/rtems.h b/gcc/config/arm/rtems.h index 53cd9879552..b34bbe8a063 100644 --- a/gcc/config/arm/rtems.h +++ b/gcc/config/arm/rtems.h @@ -27,3 +27,5 @@ builtin_assert ("system=rtems"); \ TARGET_BPABI_CPP_BUILTINS(); \ } while (0) + +#define ARM_DEFAULT_SHORT_ENUMS false |