llvm.org GIT mirror llvm / 4bf8ecc
Approved by Evan: $ svn merge -c 113637 https://llvm.org/svn/llvm-project/llvm/trunk --- Merging r113637 into '.': U lib/Target/ARM/ARMBaseInstrInfo.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_28@113639 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 10 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
922922
923923 unsigned PCLabelId = AFI->createConstPoolEntryUId();
924924 ARMConstantPoolValue *NewCPV = 0;
925 // FIXME: The below assumes PIC relocation model and that the function
926 // is Thumb mode (t1 or t2). PCAdjustment would be 8 for ARM mode PIC, and
927 // zero for non-PIC in ARM or Thumb. The callers are all of thumb LDR
928 // instructions, so that's probably OK, but is PIC always correct when
929 // we get here?
925930 if (ACPV->isGlobalValue())
926931 NewCPV = new ARMConstantPoolValue(ACPV->getGV(), PCLabelId,
927932 ARMCP::CPValue, 4);
931936 else if (ACPV->isBlockAddress())
932937 NewCPV = new ARMConstantPoolValue(ACPV->getBlockAddress(), PCLabelId,
933938 ARMCP::CPBlockAddress, 4);
939 else if (ACPV->isLSDA())
940 NewCPV = new ARMConstantPoolValue(MF.getFunction(), PCLabelId,
941 ARMCP::CPLSDA, 4);
934942 else
935943 llvm_unreachable("Unexpected ARM constantpool value type!!");
936944 CPI = MCP->getConstantPoolIndex(NewCPV, MCPE.getAlignment());