aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/ARMFrameLowering.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-10-02 18:07:13 +0000
committerTim Northover <tnorthover@apple.com>2015-10-02 18:07:13 +0000
commit956b008db6d43ad81c69ced260650e3c2b286c47 (patch)
treecd7e54b0e06a1589bc406c97a03c13a1d7fd5176 /llvm/lib/Target/ARM/ARMFrameLowering.cpp
parent58d7ee397d0aa7a005e7b7cba22f8139108b2e7a (diff)
downloadllvm-956b008db6d43ad81c69ced260650e3c2b286c47.zip
llvm-956b008db6d43ad81c69ced260650e3c2b286c47.tar.gz
llvm-956b008db6d43ad81c69ced260650e3c2b286c47.tar.bz2
ARM: correctly align constant pool value on Thumb1 targets.
Since we're using tLDRpci to access it, the constant pool's address must be 0 (mod 4). llvm-svn: 249163
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFrameLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
index 5b5b1b0..476a12f 100644
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
@@ -1968,7 +1968,7 @@ void ARMFrameLowering::adjustForSegmentedStacks(
ARMConstantPoolValue *NewCPV = ARMConstantPoolSymbol::Create(
MF.getFunction()->getContext(), "__STACK_LIMIT", PCLabelId, 0);
MachineConstantPool *MCP = MF.getConstantPool();
- unsigned CPI = MCP->getConstantPoolIndex(NewCPV, MF.getAlignment());
+ unsigned CPI = MCP->getConstantPoolIndex(NewCPV, 4);
// ldr SR0, [pc, offset(STACK_LIMIT)]
AddDefaultPred(BuildMI(GetMBB, DL, TII.get(ARM::tLDRpci), ScratchReg0)