This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[arm] Set PCC_BITFIELD_TYPE_MATTERS
- From: Paul Brook <paul at codesourcery dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 12 May 2004 18:23:57 +0100
- Subject: [arm] Set PCC_BITFIELD_TYPE_MATTERS
- Organization: CodeSourcery
Patch below sets PCC_BITFIELD_TYPE_MATTERS when using the AAPCS ABI. Elf based
targets set this anyway, so should already be ok.
Tested with cross to arm-none-elf.
Ok?
Paul
2004-05-12 Paul Brook <paul@codesourcery.com>
* config/arm/arm.h (PCC_BITFIELD_TYPE_MATTERS): Define.
Index: arm.h
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.233
diff -u -p -r1.233 arm.h
--- a/arm.h 10 May 2004 13:39:20 -0000 1.233
+++ b/arm.h 12 May 2004 16:43:51 -0000
@@ -729,6 +729,12 @@ extern const char * structure_size_strin
#ifndef SIZE_TYPE
#define SIZE_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long unsigned int")
#endif
+
+/* AAPCS requires that structure alignment is effected by bitfields. */
+#ifndef PCC_BITFIELD_TYPE_MATTERS
+#define PCC_BITFIELD_TYPE_MATTERS TARGET_AAPCS_BASED
+#endif
+
/* Standard register usage. */