mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
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
This commit is contained in:
parent
4e9c939312
commit
51f5b67395
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user