mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Make register Mips::RA allocatable if not in mips16 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159971 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -233,6 +233,13 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
.addMemOperand(MMO);
|
||||
}
|
||||
|
||||
void MipsInstrInfo::ExpandRetRA(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned Opc) const {
|
||||
BuildMI(MBB, I, I->getDebugLoc(), TM.getInstrInfo()->get(Opc))
|
||||
.addReg(Mips::RA);
|
||||
}
|
||||
|
||||
void MipsInstrInfo::ExpandExtractElementF64(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I) const {
|
||||
const TargetInstrInfo *TII = TM.getInstrInfo();
|
||||
@ -272,6 +279,12 @@ bool MipsInstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
|
||||
switch(MI->getDesc().getOpcode()) {
|
||||
default:
|
||||
return false;
|
||||
case Mips::RetRA:
|
||||
ExpandRetRA(MBB, MI, Mips::RET);
|
||||
break;
|
||||
case Mips::RetRA16:
|
||||
ExpandRetRA(MBB, MI, Mips::RET16);
|
||||
break;
|
||||
case Mips::BuildPairF64:
|
||||
ExpandBuildPairF64(MBB, MI);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user