mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
PPC32 uses R2 as the TLS register. Fix the copy and paste.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158004 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5d59b0b38e
commit
3e77af4318
@ -1239,9 +1239,9 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op,
|
||||
|
||||
if (model != TLSModel::LocalExec)
|
||||
llvm_unreachable("only local-exec TLS mode supported");
|
||||
SDValue R13 = DAG.getRegister(is64bit ? PPC::X13 : PPC::R13,
|
||||
is64bit ? MVT::i64 : MVT::i32);
|
||||
SDValue Hi = DAG.getNode(PPCISD::Hi, dl, PtrVT, TGAHi, R13);
|
||||
SDValue TLSReg = DAG.getRegister(is64bit ? PPC::X13 : PPC::R2,
|
||||
is64bit ? MVT::i64 : MVT::i32);
|
||||
SDValue Hi = DAG.getNode(PPCISD::Hi, dl, PtrVT, TGAHi, TLSReg);
|
||||
return DAG.getNode(PPCISD::Lo, dl, PtrVT, TGALo, Hi);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user