mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Use PC-relative address for x32 TLS address
Since x32 supports PC-relative address, it shouldn't use EBX for TLS address. Instead of checking N.getValueType(), we should check Subtarget->is32Bit(). This fixes PR 22676. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D16474
This commit is contained in:
parent
eec32dd187
commit
ced4c140a0
@ -2694,12 +2694,12 @@ bool X86DAGToDAGISel::selectTLSADDRAddr(SDValue N, SDValue &Base,
|
||||
AM.Disp += GA->getOffset();
|
||||
AM.SymbolFlags = GA->getTargetFlags();
|
||||
|
||||
MVT VT = N.getSimpleValueType();
|
||||
if (VT == MVT::i32) {
|
||||
if (Subtarget->is32Bit()) {
|
||||
AM.Scale = 1;
|
||||
AM.IndexReg = CurDAG->getRegister(X86::EBX, MVT::i32);
|
||||
}
|
||||
|
||||
MVT VT = N.getSimpleValueType();
|
||||
getAddressOperands(AM, SDLoc(N), VT, Base, Scale, Index, Disp, Segment);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user