arm.c (arm_promote_prototypes): Use TARGET_AAPCS_BASED.
authorPaul Brook <paul@codesourcery.com>
Mon, 10 May 2004 13:39:20 +0000 (13:39 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Mon, 10 May 2004 13:39:20 +0000 (13:39 +0000)
* 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
gcc/config/arm/arm.c
gcc/config/arm/arm.h

index 90dce94c7c1f3aad11266a6436680fee1409cf0e..27177b22adcc4335d33fad83fea83df58ca11df7 100644 (file)
@@ -1,3 +1,12 @@
+2004-05-10  Paul Brook  <paul@codesourcery.com>
+
+       * 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  <amodra@bigpond.net.au>
 
        * config/rs6000/rs6000.c (function_arg_boundary): Align for ABI_V4
index 961dff2278ef7a9503520faa76194aaaff00870a..371ffe8e1c04bb36dee79bfee8fbab96b66f4548 100644 (file)
@@ -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;
 }
 
index c870af0052f513f390b6ffc7dfa6cfa942aafda7..724a0d15646de8c94fa2e21ab6e326cb57af7760 100644 (file)
@@ -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
 \f
 /* Standard register usage.  */