[llvm-commits] CVS: llvm/include/llvm/CodeGen/InstrSelectionSupport.h
Vikram Adve
vadve at cs.uiuc.edu
Sun Sep 29 17:56:05 PDT 2002
Changes in directory llvm/include/llvm/CodeGen:
InstrSelectionSupport.h updated: 1.13 -> 1.14
---
Log message:
Added several more helper functions for construction MachineInstrs.
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/InstrSelectionSupport.h
diff -u llvm/include/llvm/CodeGen/InstrSelectionSupport.h:1.13 llvm/include/llvm/CodeGen/InstrSelectionSupport.h:1.14
--- llvm/include/llvm/CodeGen/InstrSelectionSupport.h:1.13 Mon Sep 16 10:58:34 2002
+++ llvm/include/llvm/CodeGen/InstrSelectionSupport.h Sun Sep 29 17:55:45 2002
@@ -114,6 +114,32 @@
}
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)
{
MachineInstr* M = new MachineInstr(opCode);
More information about the llvm-commits
mailing list