mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-07 05:55:44 +00:00
Do not add the pass that restores $gp if target is Mips64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
00418ea91c
commit
78fec58c07
@ -96,7 +96,10 @@ addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel)
|
|||||||
|
|
||||||
bool MipsTargetMachine::
|
bool MipsTargetMachine::
|
||||||
addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel) {
|
addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel) {
|
||||||
PM.add(createMipsEmitGPRestorePass(*this));
|
// Do not restore $gp if target is Mips64.
|
||||||
|
// In N32/64, $gp is a callee-saved register.
|
||||||
|
if (!Subtarget.hasMips64())
|
||||||
|
PM.add(createMipsEmitGPRestorePass(*this));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user