mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32027 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d0ff02cf6f
commit
4946399b64
@ -643,10 +643,12 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
|
||||
|
||||
// For X86-64 PIC code, only allow GV / CP + displacement so we can use RIP
|
||||
// relative addressing mode.
|
||||
if ((!Subtarget->is64Bit() || TM.getCodeModel() == CodeModel::Small) &&
|
||||
(!Available || (AM.Base.Reg.Val && AM.IndexReg.Val))) {
|
||||
if (Subtarget->is64Bit() && TM.getCodeModel() != CodeModel::Small)
|
||||
break;
|
||||
if (!Available || (AM.Base.Reg.Val && AM.IndexReg.Val)) {
|
||||
bool isRIP = Subtarget->is64Bit();
|
||||
if (isRIP && (AM.Base.Reg.Val || AM.Scale > 1 || AM.IndexReg.Val ||
|
||||
if (isRIP &&
|
||||
(AM.Base.Reg.Val || AM.Scale > 1 || AM.IndexReg.Val ||
|
||||
AM.BaseType == X86ISelAddressMode::FrameIndexBase))
|
||||
break;
|
||||
if (ConstantPoolSDNode *CP =
|
||||
@ -655,8 +657,7 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
|
||||
AM.CP = CP->getConstVal();
|
||||
AM.Align = CP->getAlignment();
|
||||
AM.Disp += CP->getOffset();
|
||||
if (isRIP)
|
||||
AM.isRIPRel = true;
|
||||
AM.isRIPRel = isRIP;
|
||||
return false;
|
||||
}
|
||||
} else if (GlobalAddressSDNode *G =
|
||||
@ -664,8 +665,7 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
|
||||
if (AM.GV == 0) {
|
||||
AM.GV = G->getGlobal();
|
||||
AM.Disp += G->getOffset();
|
||||
if (isRIP)
|
||||
AM.isRIPRel = true;
|
||||
AM.isRIPRel = isRIP;
|
||||
return false;
|
||||
}
|
||||
} else if (isRoot && isRIP) {
|
||||
|
Loading…
Reference in New Issue
Block a user