mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-31 09:32:11 +00:00
Only using x86-64 rip relative addressing in non-staic mode?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
073c5b721d
commit
9f143ce989
@ -679,21 +679,25 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
|
||||
GlobalValue *GV = G->getGlobal();
|
||||
AM.GV = GV;
|
||||
AM.Disp += G->getOffset();
|
||||
AM.isRIPRel = is64Bit;
|
||||
AM.isRIPRel = TM.getRelocationModel() != Reloc::Static &&
|
||||
Subtarget->isPICStyleRIPRel();
|
||||
return false;
|
||||
} else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(N0)) {
|
||||
AM.CP = CP->getConstVal();
|
||||
AM.Align = CP->getAlignment();
|
||||
AM.Disp += CP->getOffset();
|
||||
AM.isRIPRel = is64Bit;
|
||||
AM.isRIPRel = TM.getRelocationModel() != Reloc::Static &&
|
||||
Subtarget->isPICStyleRIPRel();
|
||||
return false;
|
||||
} else if (ExternalSymbolSDNode *S =dyn_cast<ExternalSymbolSDNode>(N0)) {
|
||||
AM.ES = S->getSymbol();
|
||||
AM.isRIPRel = is64Bit;
|
||||
AM.isRIPRel = TM.getRelocationModel() != Reloc::Static &&
|
||||
Subtarget->isPICStyleRIPRel();
|
||||
return false;
|
||||
} else if (JumpTableSDNode *J = dyn_cast<JumpTableSDNode>(N0)) {
|
||||
AM.JT = J->getIndex();
|
||||
AM.isRIPRel = is64Bit;
|
||||
AM.isRIPRel = TM.getRelocationModel() != Reloc::Static &&
|
||||
Subtarget->isPICStyleRIPRel();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user