consistent with how BuildMI works. No new tests needed. All should work
the same as before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175342
91177308-0d34-0410-b5e6-
96231b3b80d8
int64_t Remainder = FrameSize - Base;
BuildMI(MBB, I, DL, get(Mips::SaveRaF16)). addImm(Base);
if (isInt<16>(-Remainder))
int64_t Remainder = FrameSize - Base;
BuildMI(MBB, I, DL, get(Mips::SaveRaF16)). addImm(Base);
if (isInt<16>(-Remainder))
- BuildAddiuSpImm(MBB, I, DL, -Remainder);
+ BuildMI(MBB, I, DL, AddiuSpImm(-Remainder)).addImm(-Remainder);
else
adjustStackPtrBig(SP, -Remainder, MBB, I, Mips::V0, Mips::V1);
}
else
adjustStackPtrBig(SP, -Remainder, MBB, I, Mips::V0, Mips::V1);
}
// returns largest possible n bit unsigned integer
int64_t Remainder = FrameSize - Base;
if (isInt<16>(Remainder))
// returns largest possible n bit unsigned integer
int64_t Remainder = FrameSize - Base;
if (isInt<16>(Remainder))
- BuildAddiuSpImm(MBB, I, DL, Remainder);
+ BuildMI(MBB, I, DL, AddiuSpImm(Remainder)).addImm(Remainder);
else
adjustStackPtrBig(SP, Remainder, MBB, I, Mips::A0, Mips::A1);
BuildMI(MBB, I, DL, get(Mips::RestoreRaF16)). addImm(Base);
else
adjustStackPtrBig(SP, Remainder, MBB, I, Mips::A0, Mips::A1);
BuildMI(MBB, I, DL, get(Mips::RestoreRaF16)). addImm(Base);
MachineBasicBlock::iterator I) const {
DebugLoc DL = I != MBB.end() ? I->getDebugLoc() : DebugLoc();
if (isInt<16>(Amount)) // need to change to addiu sp, ....and isInt<16>
MachineBasicBlock::iterator I) const {
DebugLoc DL = I != MBB.end() ? I->getDebugLoc() : DebugLoc();
if (isInt<16>(Amount)) // need to change to addiu sp, ....and isInt<16>
- BuildAddiuSpImm(MBB, I, DL, Amount);
+ BuildMI(MBB, I, DL, AddiuSpImm(Amount)).addImm(Amount);
else
adjustStackPtrBigUnrestricted(SP, Amount, MBB, I);
}
else
adjustStackPtrBigUnrestricted(SP, Amount, MBB, I);
}
BuildMI(MBB, I, I->getDebugLoc(), get(Opc));
}
BuildMI(MBB, I, I->getDebugLoc(), get(Opc));
}
-void Mips16InstrInfo::BuildAddiuSpImm(
- MachineBasicBlock &MBB,
- MachineBasicBlock::iterator II, DebugLoc DL, int64_t Imm) const {
+const MCInstrDesc &Mips16InstrInfo::AddiuSpImm(int64_t Imm) const {
- BuildMI(MBB, II, DL, get(Mips::AddiuSpImm16)).addImm(Imm);
+ return get(Mips::AddiuSpImm16);
- BuildMI(MBB, II, DL, get(Mips::AddiuSpImmX16)).addImm(Imm);
+ return get(Mips::AddiuSpImmX16);
}
const MipsInstrInfo *llvm::createMips16InstrInfo(MipsTargetMachine &TM) {
}
const MipsInstrInfo *llvm::createMips16InstrInfo(MipsTargetMachine &TM) {
//
// build the proper one based on the Imm field
//
//
// build the proper one based on the Imm field
//
- void BuildAddiuSpImm(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator II, DebugLoc DL,
- int64_t Imm) const;
+ const MCInstrDesc& AddiuSpImm(int64_t Imm) const;
private:
virtual unsigned GetAnalyzableBrOpc(unsigned Opc) const;
private:
virtual unsigned GetAnalyzableBrOpc(unsigned Opc) const;