From f812506912d7432acde766d1ee93205843e5817c Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 22 Apr 2010 16:14:54 +0000 Subject: ARM/APCS: Don't respect bit-field types when laying out structures. - This fixes the last known ABI issues with ARM/APCS. - I've run the first 1k ABITests with '--no-unsigned --no-vector --no-complex' on {armv6, armv7} x {-mno-thumb, -mthumb}, and the first 10k tests for armv7 -mthumb, for both function return types and single argument calls. These all pass now (they failed horribly before without --no-bitfield). llvm-svn: 102070 --- clang/lib/Basic/Targets.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Basic/Targets.cpp') diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index b94f55bdfd6..6624ed9d38e 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -1418,6 +1418,10 @@ public: DoubleAlign = LongLongAlign = LongDoubleAlign = 32; SizeType = UnsignedLong; + // Do not respect the alignment of bit-field types when laying out + // structures. This corresponds to PCC_BITFIELD_TYPE_MATTERS in gcc. + UseBitFieldTypeAlignment = false; + if (IsThumb) { DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-" "i64:32:32-f32:32:32-f64:32:32-" -- cgit v1.2.3