mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
add relocation support for ppc64 branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -127,11 +127,11 @@ int PPCCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) {
|
|||||||
} else if (MO.isGlobalAddress() || MO.isExternalSymbol() ||
|
} else if (MO.isGlobalAddress() || MO.isExternalSymbol() ||
|
||||||
MO.isConstantPoolIndex() || MO.isJumpTableIndex()) {
|
MO.isConstantPoolIndex() || MO.isJumpTableIndex()) {
|
||||||
unsigned Reloc = 0;
|
unsigned Reloc = 0;
|
||||||
if (MI.getOpcode() == PPC::BL)
|
if (MI.getOpcode() == PPC::BL || MI.getOpcode() == PPC::BL8)
|
||||||
Reloc = PPC::reloc_pcrel_bx;
|
Reloc = PPC::reloc_pcrel_bx;
|
||||||
else {
|
else {
|
||||||
switch (MI.getOpcode()) {
|
switch (MI.getOpcode()) {
|
||||||
default: DEBUG(MI.dump()); assert(0 && "Unknown instruction for relocation!");
|
default: MI.dump(); assert(0 && "Unknown instruction for relocation!");
|
||||||
case PPC::LIS:
|
case PPC::LIS:
|
||||||
case PPC::LIS8:
|
case PPC::LIS8:
|
||||||
case PPC::ADDIS:
|
case PPC::ADDIS:
|
||||||
|
Reference in New Issue
Block a user