mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Added two more helper functions for instruction creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2819 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08272fbdb2
commit
c920dc714d
@ -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