mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Have TargetLowering::getPICJumpTableRelocBase return a node that points to the
GOT if jump table uses 64-bit gp-relative relocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154341 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1079,8 +1079,12 @@ unsigned TargetLowering::getJumpTableEncoding() const {
|
||||
SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table,
|
||||
SelectionDAG &DAG) const {
|
||||
// If our PIC model is GP relative, use the global offset table as the base.
|
||||
if (getJumpTableEncoding() == MachineJumpTableInfo::EK_GPRel32BlockAddress)
|
||||
unsigned JTEncoding = getJumpTableEncoding();
|
||||
|
||||
if ((JTEncoding == MachineJumpTableInfo::EK_GPRel64BlockAddress) ||
|
||||
(JTEncoding == MachineJumpTableInfo::EK_GPRel32BlockAddress))
|
||||
return DAG.getGLOBAL_OFFSET_TABLE(getPointerTy());
|
||||
|
||||
return Table;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user