forked from OSchip/llvm-project
Use r2 when encoding tls on ppc32. Fixes PR18305.
llvm-svn: 197878
This commit is contained in:
parent
2151e63c71
commit
bc1655b4b0
|
@ -217,7 +217,8 @@ unsigned PPCMCCodeEmitter::getTLSRegEncoding(const MCInst &MI, unsigned OpNo,
|
|||
// Return the thread-pointer register's encoding.
|
||||
Fixups.push_back(MCFixup::Create(0, MO.getExpr(),
|
||||
(MCFixupKind)PPC::fixup_ppc_nofixup));
|
||||
return CTX.getRegisterInfo()->getEncodingValue(PPC::X13);
|
||||
bool isPPC64 = TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le;
|
||||
return CTX.getRegisterInfo()->getEncodingValue(isPPC64 ? PPC::X13 : PPC::R2);
|
||||
}
|
||||
|
||||
unsigned PPCMCCodeEmitter::getTLSCallEncoding(const MCInst &MI, unsigned OpNo,
|
||||
|
|
Loading…
Reference in New Issue