diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-09-10 21:38:22 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-09-10 21:38:22 +0000 |
commit | 51f5b67395780b8421f4aa6ee998ed51b23dae9d (patch) | |
tree | 340ca2484b5fa386845daea8d3b5da3ada44553e /lib | |
parent | 4e9c939312ff73bd0c6a6485fd5f97012f5910fa (diff) | |
download | llvm-51f5b67395780b8421f4aa6ee998ed51b23dae9d.tar.gz llvm-51f5b67395780b8421f4aa6ee998ed51b23dae9d.tar.bz2 llvm-51f5b67395780b8421f4aa6ee998ed51b23dae9d.tar.xz |
Add a missing case to duplicateCPV() for LSDA constants. Add a FIXME. rdar://8302157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index e7b35c6928..e7024d6da7 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -922,6 +922,11 @@ static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) { unsigned PCLabelId = AFI->createConstPoolEntryUId(); ARMConstantPoolValue *NewCPV = 0; + // FIXME: The below assumes PIC relocation model and that the function + // is Thumb mode (t1 or t2). PCAdjustment would be 8 for ARM mode PIC, and + // zero for non-PIC in ARM or Thumb. The callers are all of thumb LDR + // instructions, so that's probably OK, but is PIC always correct when + // we get here? if (ACPV->isGlobalValue()) NewCPV = new ARMConstantPoolValue(ACPV->getGV(), PCLabelId, ARMCP::CPValue, 4); @@ -931,6 +936,9 @@ static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) { else if (ACPV->isBlockAddress()) NewCPV = new ARMConstantPoolValue(ACPV->getBlockAddress(), PCLabelId, ARMCP::CPBlockAddress, 4); + else if (ACPV->isLSDA()) + NewCPV = new ARMConstantPoolValue(MF.getFunction(), PCLabelId, + ARMCP::CPLSDA, 4); else llvm_unreachable("Unexpected ARM constantpool value type!!"); CPI = MCP->getConstantPoolIndex(NewCPV, MCPE.getAlignment()); |