From b6685939515a82257ce895032e981c34b3b71b39 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Mon, 10 May 2004 13:39:20 +0000 Subject: [PATCH] arm.c (arm_promote_prototypes): Use TARGET_AAPCS_BASED. * config/arm/arm.c (arm_promote_prototypes): Use TARGET_AAPCS_BASED. * config/arm/arm.h (TARGET_AAPCS_BASED): Define. (TARGET_DOUBLEWORD_ALIGN): Use it. (WCHAR_TYPE): Define. (WCHAR_SIZE_TYPE): Define. (SIZE_TYPE): Define. From-SVN: r81665 --- gcc/ChangeLog | 9 +++++++++ gcc/config/arm/arm.c | 2 +- gcc/config/arm/arm.h | 17 +++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90dce94c7c1..27177b22adc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2004-05-10 Paul Brook + + * config/arm/arm.c (arm_promote_prototypes): Use TARGET_AAPCS_BASED. + * config/arm/arm.h (TARGET_AAPCS_BASED): Define. + (TARGET_DOUBLEWORD_ALIGN): Use it. + (WCHAR_TYPE): Define. + (WCHAR_SIZE_TYPE): Define. + (SIZE_TYPE): Define. + 2004-05-10 Alan Modra * config/rs6000/rs6000.c (function_arg_boundary): Align for ABI_V4 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 961dff2278e..371ffe8e1c0 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -14550,6 +14550,6 @@ arm_no_early_mul_dep (rtx producer, rtx consumer) static bool arm_promote_prototypes (tree t ATTRIBUTE_UNUSED) { - return arm_abi == ARM_ABI_APCS || arm_abi == ARM_ABI_ATPCS; + return !TARGET_AAPCS_BASED; } diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index c870af0052f..724a0d15646 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -307,6 +307,8 @@ extern GTY(()) rtx aof_pic_label; : (target_flags & THUMB_FLAG_BACKTRACE)) #define TARGET_CIRRUS_FIX_INVALID_INSNS (target_flags & CIRRUS_FIX_INVALID_INSNS) #define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN) +#define TARGET_AAPCS_BASED \ + (arm_abi != ARM_ABI_APCS && arm_abi != ARM_ABI_ATPCS) /* SUBTARGET_SWITCHES is used to add flags on a per-config basis. */ #ifndef SUBTARGET_SWITCHES @@ -655,8 +657,8 @@ extern int arm_is_6_or_7; #define UNITS_PER_WORD 4 /* True if natural alignment is used for doubleword types. */ -#define ARM_DOUBLEWORD_ALIGN \ - (arm_abi == ARM_ABI_AAPCS || arm_abi == ARM_ABI_IWMMXT) +#define ARM_DOUBLEWORD_ALIGN TARGET_AAPCS_BASED + #define DOUBLEWORD_ALIGNMENT 64 #define PARM_BOUNDARY 32 @@ -716,6 +718,17 @@ extern const char * structure_size_string; /* Nonzero if move instructions will actually fail to work when given unaligned data. */ #define STRICT_ALIGNMENT 1 + +/* wchar_t is unsigned under the AAPCS. */ +#ifndef WCHAR_TYPE +#define WCHAR_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "int") + +#define WCHAR_TYPE_SIZE BITS_PER_WORD +#endif + +#ifndef SIZE_TYPE +#define SIZE_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long unsigned int") +#endif /* Standard register usage. */ -- 2.30.2