mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-05 09:24:28 +00:00
switch MIBuilder over to use the simplified operand addition methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -40,46 +40,47 @@ public:
|
|||||||
MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false,
|
MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false,
|
||||||
bool isImp = false, bool isKill = false,
|
bool isImp = false, bool isKill = false,
|
||||||
bool isDead = false, unsigned SubReg = 0) const {
|
bool isDead = false, unsigned SubReg = 0) const {
|
||||||
MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead, SubReg);
|
MI->addOperand(MachineOperand::CreateReg(RegNo, isDef, isImp, isKill,
|
||||||
|
isDead, SubReg));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// addImm - Add a new immediate operand.
|
/// addImm - Add a new immediate operand.
|
||||||
///
|
///
|
||||||
const MachineInstrBuilder &addImm(int64_t Val) const {
|
const MachineInstrBuilder &addImm(int64_t Val) const {
|
||||||
MI->addImmOperand(Val);
|
MI->addOperand(MachineOperand::CreateImm(Val));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const {
|
const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const {
|
||||||
MI->addMachineBasicBlockOperand(MBB);
|
MI->addOperand(MachineOperand::CreateBasicBlock(MBB));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineInstrBuilder &addFrameIndex(unsigned Idx) const {
|
const MachineInstrBuilder &addFrameIndex(unsigned Idx) const {
|
||||||
MI->addFrameIndexOperand(Idx);
|
MI->addOperand(MachineOperand::CreateFrameIndex(Idx));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx,
|
const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx,
|
||||||
int Offset = 0) const {
|
int Offset = 0) const {
|
||||||
MI->addConstantPoolIndexOperand(Idx, Offset);
|
MI->addOperand(MachineOperand::CreateConstantPoolIndex(Idx, Offset));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineInstrBuilder &addJumpTableIndex(unsigned Idx) const {
|
const MachineInstrBuilder &addJumpTableIndex(unsigned Idx) const {
|
||||||
MI->addJumpTableIndexOperand(Idx);
|
MI->addOperand(MachineOperand::CreateJumpTableIndex(Idx));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
|
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
|
||||||
int Offset = 0) const {
|
int Offset = 0) const {
|
||||||
MI->addGlobalAddressOperand(GV, Offset);
|
MI->addOperand(MachineOperand::CreateGlobalAddress(GV, Offset));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{
|
const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{
|
||||||
MI->addExternalSymbolOperand(FnName);
|
MI->addOperand(MachineOperand::CreateExternalSymbol(FnName, 0));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user