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:
Roman Divacky 2012-06-05 17:14:17 +00:00
parent 5d59b0b38e
commit 3e77af4318

View File

@ -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);
}