From 6b045785002561aa9bef6a0e9654b385e04de5e0 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 13 May 2004 11:16:27 +0000 Subject: [PATCH] arm.c (arm_default_short_enums): New function. * config/arm/arm.c (arm_default_short_enums): New function. (TARGET_DEFAULT_SHORT_ENUMS): Define. From-SVN: r81776 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 46d8d2e..2510e13 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-13 Paul Brook + + * config/arm/arm.c (arm_default_short_enums): New function. + (TARGET_DEFAULT_SHORT_ENUMS): Define. + 2004-05-13 Diego Novillo Merge from tree-ssa-20020619-branch. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index ae9ff3a..7cf835c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -159,6 +159,7 @@ static rtx arm_struct_value_rtx (tree, int); static void arm_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int); static bool arm_promote_prototypes (tree); +static bool arm_default_short_enums (void); /* Initialize the GCC target structure. */ @@ -256,6 +257,9 @@ static bool arm_promote_prototypes (tree); #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS arm_setup_incoming_varargs +#undef TARGET_DEFAULT_SHORT_ENUMS +#define TARGET_DEFAULT_SHORT_ENUMS arm_default_short_enums + struct gcc_target targetm = TARGET_INITIALIZER; /* Obstack for minipool constant handling. */ @@ -14553,3 +14557,11 @@ arm_promote_prototypes (tree t ATTRIBUTE_UNUSED) return !TARGET_AAPCS_BASED; } + +/* AAPCS based ABIs use short enums by default. */ + +static bool +arm_default_short_enums (void) +{ + return TARGET_AAPCS_BASED; +} -- 2.7.4