Added several more helper functions for construction MachineInstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3983 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve 2002-09-29 22:55:45 +00:00
parent aebdbe6988
commit bbac47893f

View File

@ -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)
{