mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Do not use $gp as a dedicated global register if the target ABI is not O32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155522 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -37,8 +37,8 @@ unsigned MipsFunctionInfo::getGlobalBaseReg() {
|
||||
|
||||
const MipsSubtarget &ST = MF.getTarget().getSubtarget<MipsSubtarget>();
|
||||
|
||||
if (FixGlobalBaseReg) // $gp is the global base register.
|
||||
return GlobalBaseReg = ST.isABI_N64() ? Mips::GP_64 : Mips::GP;
|
||||
if (FixGlobalBaseReg && ST.isABI_O32()) // $gp is the global base register.
|
||||
return GlobalBaseReg = Mips::GP;
|
||||
|
||||
const TargetRegisterClass *RC = ST.isABI_N64() ?
|
||||
(const TargetRegisterClass*)&Mips::CPU64RegsRegClass :
|
||||
|
Reference in New Issue
Block a user