mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Make sure we mark these registers as defined. Previously was done
in the td file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196731 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9ea75ee5b
commit
9bdfe3644f
@ -229,9 +229,11 @@ void Mips16InstrInfo::restoreFrame(unsigned SP, int64_t FrameSize,
|
||||
DebugLoc DL = I != MBB.end() ? I->getDebugLoc() : DebugLoc();
|
||||
if (!NeverUseSaveRestore) {
|
||||
if (isUInt<11>(FrameSize))
|
||||
BuildMI(MBB, I, DL, get(Mips::RestoreX16)).addReg(Mips::RA).
|
||||
addReg(Mips::S0).
|
||||
addReg(Mips::S1).addReg(Mips::S2).addImm(FrameSize);
|
||||
BuildMI(MBB, I, DL, get(Mips::RestoreX16)).
|
||||
addReg(Mips::RA, RegState::Define).
|
||||
addReg(Mips::S0, RegState::Define).
|
||||
addReg(Mips::S1, RegState::Define).
|
||||
addReg(Mips::S2, RegState::Define).addImm(FrameSize);
|
||||
else {
|
||||
int Base = 2040; // should create template function like isUInt that
|
||||
// returns largest possible n bit unsigned integer
|
||||
@ -240,9 +242,11 @@ void Mips16InstrInfo::restoreFrame(unsigned SP, int64_t FrameSize,
|
||||
BuildAddiuSpImm(MBB, I, Remainder);
|
||||
else
|
||||
adjustStackPtrBig(SP, Remainder, MBB, I, Mips::A0, Mips::A1);
|
||||
BuildMI(MBB, I, DL, get(Mips::RestoreX16)).addReg(Mips::RA).
|
||||
addReg(Mips::S0).
|
||||
addReg(Mips::S1).addReg(Mips::S2).addImm(Base);
|
||||
BuildMI(MBB, I, DL, get(Mips::RestoreX16)).
|
||||
addReg(Mips::RA, RegState::Define).
|
||||
addReg(Mips::S0, RegState::Define).
|
||||
addReg(Mips::S1, RegState::Define).
|
||||
addReg(Mips::S2, RegState::Define).addImm(Base);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user