mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Do not reserve $gp as a dedicated global base register if the target ABI is not O32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b37637b7f
commit
b75673b6e1
@ -126,7 +126,8 @@ void MipsDAGToDAGISel::InitGlobalBaseReg(MachineFunction &MF) {
|
||||
unsigned V0, V1, GlobalBaseReg = MipsFI->getGlobalBaseReg();
|
||||
bool FixGlobalBaseReg = MipsFI->globalBaseRegFixed();
|
||||
|
||||
if (FixGlobalBaseReg) // $gp is the global base register.
|
||||
if (Subtarget.isABI_O32() && FixGlobalBaseReg)
|
||||
// $gp is the global base register.
|
||||
V0 = V1 = GlobalBaseReg;
|
||||
else {
|
||||
const TargetRegisterClass *RC;
|
||||
|
Loading…
Reference in New Issue
Block a user