mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Added two more helper functions for instruction creation.
llvm-svn: 2819
This commit is contained in:
parent
da5e272403
commit
4d696efa99
@ -136,6 +136,27 @@ Create2OperandInstr_SImmed(MachineOpCode opCode,
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create2OperandInstr_Reg(MachineOpCode opCode,
|
||||
Value* argVal1, unsigned int regNum)
|
||||
{
|
||||
MachineInstr* M = new MachineInstr(opCode);
|
||||
M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister, argVal1);
|
||||
M->SetMachineOperandReg(1, regNum);
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create2OperandInstr_Reg(MachineOpCode opCode,
|
||||
unsigned int regNum1, unsigned int regNum2)
|
||||
|
||||
{
|
||||
MachineInstr* M = new MachineInstr(opCode);
|
||||
M->SetMachineOperandReg(0, regNum1);
|
||||
M->SetMachineOperandReg(1, regNum2);
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create3OperandInstr(MachineOpCode opCode,
|
||||
Value* argVal1, MachineOperand::MachineOperandType type1,
|
||||
|
Loading…
Reference in New Issue
Block a user