aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMTargetMachine.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-31 22:08:40 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-31 22:08:40 +0000
commit0fa10515ee93821aab035efbd39cf7cb311d639e (patch)
tree68522f90e71ad930a3c47926bd92f6c404ccc410 /lib/Target/ARM/ARMTargetMachine.cpp
parent86eb5153594b523e0b201735e14c92785d7ba601 (diff)
Thumb add sp, #imm requires the immediate value be multiple of 4. For now,
change preferred alignment of short, byte, bool to 4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r--lib/Target/ARM/ARMTargetMachine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp
index 7e248a609d..41456ba736 100644
--- a/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/lib/Target/ARM/ARMTargetMachine.cpp
@@ -35,8 +35,12 @@ namespace {
ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS)
: Subtarget(M, FS),
DataLayout(Subtarget.isTargetDarwin() ?
- std::string("e-p:32:32-d:32:32-l:32: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") :
+ 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"))),
InstrInfo(Subtarget),
FrameInfo(Subtarget) {}