mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 14:20:29 +00:00
Added several more helper functions for construction MachineInstrs.
llvm-svn: 3983
This commit is contained in:
parent
01e64b5eef
commit
dddfcdc478
@ -113,6 +113,32 @@ Create1OperandInstr(MachineOpCode opCode, Value* argVal1)
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create1OperandInstr_UImmed(MachineOpCode opCode, unsigned int unextendedImmed)
|
||||
{
|
||||
MachineInstr* M = new MachineInstr(opCode);
|
||||
M->SetMachineOperandConst(0, MachineOperand::MO_UnextendedImmed,
|
||||
unextendedImmed);
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create1OperandInstr_SImmed(MachineOpCode opCode, int signExtendedImmed)
|
||||
{
|
||||
MachineInstr* M = new MachineInstr(opCode);
|
||||
M->SetMachineOperandConst(0, MachineOperand::MO_SignExtendedImmed,
|
||||
signExtendedImmed);
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create1OperandInstr_Addr(MachineOpCode opCode, Value* label)
|
||||
{
|
||||
MachineInstr* M = new MachineInstr(opCode);
|
||||
M->SetMachineOperandVal(0, MachineOperand::MO_PCRelativeDisp, label);
|
||||
return M;
|
||||
}
|
||||
|
||||
inline MachineInstr*
|
||||
Create2OperandInstr(MachineOpCode opCode, Value* argVal1, Value* argVal2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user