mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 17:39:16 +00:00
Fix LowerJumpTable to produce instructions with the correct relocation
types for N32 ABI. Test case will be updated after the patch that fixes TargetLowering::getPICJumpTableRelocBase is checked in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
86a2733055
commit
c75ceb7809
@ -1681,8 +1681,8 @@ LowerJumpTable(SDValue Op, SelectionDAG &DAG) const
|
||||
HiPart = DAG.getNode(MipsISD::Hi, dl, PtrVT, JTI);
|
||||
JTILo = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, MipsII::MO_ABS_LO);
|
||||
} else {// Emit Load from Global Pointer
|
||||
unsigned GOTFlag = IsN64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
|
||||
unsigned OfstFlag = IsN64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
|
||||
unsigned GOTFlag = HasMips64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
|
||||
unsigned OfstFlag = HasMips64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
|
||||
JTI = DAG.getTargetJumpTable(JT->getIndex(), PtrVT, GOTFlag);
|
||||
JTI = DAG.getNode(MipsISD::Wrapper, dl, PtrVT, GetGlobalReg(DAG, PtrVT),
|
||||
JTI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user