mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
In MipsMCInstLower::LowerSymbolOperand, get offset from symbol if
the MachineOperand type has a valid offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157861 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
22de91aec5
commit
bed5b0db45
@ -70,14 +70,17 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
|
||||
|
||||
case MachineOperand::MO_GlobalAddress:
|
||||
Symbol = Mang->getSymbol(MO.getGlobal());
|
||||
Offset += MO.getOffset();
|
||||
break;
|
||||
|
||||
case MachineOperand::MO_BlockAddress:
|
||||
Symbol = AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress());
|
||||
Offset += MO.getOffset();
|
||||
break;
|
||||
|
||||
case MachineOperand::MO_ExternalSymbol:
|
||||
Symbol = AsmPrinter.GetExternalSymbolSymbol(MO.getSymbolName());
|
||||
Offset += MO.getOffset();
|
||||
break;
|
||||
|
||||
case MachineOperand::MO_JumpTableIndex:
|
||||
@ -86,8 +89,7 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
|
||||
|
||||
case MachineOperand::MO_ConstantPoolIndex:
|
||||
Symbol = AsmPrinter.GetCPISymbol(MO.getIndex());
|
||||
if (MO.getOffset())
|
||||
Offset += MO.getOffset();
|
||||
Offset += MO.getOffset();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user