diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-02-01 02:18:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-01 02:18:36 +0000 |
commit | 9312313a56ca3d4d904e8f7e9b4fe152a293eae1 (patch) | |
tree | c8a4008ee0cd7140ea7cee51a613898b1eaa77b3 | |
parent | f97e5420cb993de55616ee637eccb89c30ed9d31 (diff) |
Also set alignment of stack-based structs to 4 in thumb mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33741 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMRegisterInfo.cpp | 3 | ||||
-rw-r--r-- | lib/Target/ARM/ARMTargetMachine.cpp | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 3b8dba3211..9c9aef7599 100644 --- a/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/lib/Target/ARM/ARMRegisterInfo.cpp @@ -708,8 +708,7 @@ void ARMRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const{ } Offset += InstrOffs * Scale; - assert((Scale == 1 || (Offset & (Scale-1)) == 0) && - "Can't encode this offset!"); + assert((Offset & (Scale-1)) == 0 && "Can't encode this offset!"); if (Offset < 0) { Offset = -Offset; isSub = true; diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp index 41456ba736..0b74348721 100644 --- a/lib/Target/ARM/ARMTargetMachine.cpp +++ b/lib/Target/ARM/ARMTargetMachine.cpp @@ -35,12 +35,12 @@ namespace { ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS) : Subtarget(M, FS), DataLayout(Subtarget.isTargetDarwin() ? - (Subtarget.isThumb() ? - std::string("e-p:32:32-d:32:32-l:32:32-s:16:32-b:8:32-B:8:32") : - std::string("e-p:32:32-d:32:32-l:32:32")) : - (Subtarget.isThumb() ? - std::string("e-p:32:32-d:32:64-l:32:64-s:16:32-b:8:32-B:8:32") : - std::string("e-p:32:32-d:32:64-l:32:64"))), + (Subtarget.isThumb() ? + std::string("e-p:32:32-d:32:32-l:32:32-s:16:32-b:8:32-B:8:32-A:32") : + std::string("e-p:32:32-d:32:32-l:32:32")) : + (Subtarget.isThumb() ? + std::string("e-p:32:32-d:32:64-l:32:64-s:16:32-b:8:32-B:8:32-A:32") : + std::string("e-p:32:32-d:32:64-l:32:64"))), InstrInfo(Subtarget), FrameInfo(Subtarget) {} |