зеркало из https://github.com/microsoft/clang-1.git
ARM/APCS: Fix alignment of long double.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94685 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
78acdbfb52
Коммит
d410fa259e
|
@ -1240,7 +1240,7 @@ public:
|
|||
// FIXME: We need support for -meabi... we could just mangle it into the
|
||||
// name.
|
||||
if (Name == "apcs-gnu") {
|
||||
DoubleAlign = LongLongAlign = 32;
|
||||
DoubleAlign = LongLongAlign = LongDoubleAlign = 32;
|
||||
SizeType = UnsignedLong;
|
||||
|
||||
if (IsThumb) {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// RUN: %clang_cc1 -triple armv7-unknown-unknown -target-abi apcs-gnu %s -verify
|
||||
// RUN: %clang_cc1 -triple armv7-unknown-unknown -target-abi aapcs %s -verify
|
||||
|
||||
#ifdef __ARM_EABI__
|
||||
|
||||
struct s0 { char field0; double field1; };
|
||||
int g0[sizeof(struct s0) == 16 ? 1 : -1];
|
||||
|
||||
struct s1 { char field0; long double field1; };
|
||||
int g1[sizeof(struct s1) == 16 ? 1 : -1];
|
||||
|
||||
#else
|
||||
|
||||
struct s0 { char field0; double field1; };
|
||||
int g0[sizeof(struct s0) == 12 ? 1 : -1];
|
||||
|
||||
struct s1 { char field0; long double field1; };
|
||||
int g1[sizeof(struct s1) == 12 ? 1 : -1];
|
||||
|
||||
#endif
|
Загрузка…
Ссылка в новой задаче