diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-31 22:08:40 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-31 22:08:40 +0000 |
commit | 1c5837dc4aba30764ffea7c481015f23867ba385 (patch) | |
tree | 04c0b36a70f345317a2572ced4fcf29c8917c7ce /llvm/lib/Target/ARM/ARMTargetMachine.cpp | |
parent | ffe1d9f7fa135190607289ef14033c78262a6fbf (diff) | |
download | bcm5719-llvm-1c5837dc4aba30764ffea7c481015f23867ba385.tar.gz bcm5719-llvm-1c5837dc4aba30764ffea7c481015f23867ba385.zip |
Thumb add sp, #imm requires the immediate value be multiple of 4. For now,
change preferred alignment of short, byte, bool to 4.
llvm-svn: 33722
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMTargetMachine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 7e248a609db..41456ba7360 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/llvm/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) {} |