[llvm-commits] CVS: llvm/include/llvm/CodeGen/MInstBuilder.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 27 15:18:06 PST 2002
Changes in directory llvm/include/llvm/CodeGen:
MInstBuilder.h updated: 1.1 -> 1.2
---
Log message:
Add support or other operand types
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MInstBuilder.h
diff -u llvm/include/llvm/CodeGen/MInstBuilder.h:1.1 llvm/include/llvm/CodeGen/MInstBuilder.h:1.2
--- llvm/include/llvm/CodeGen/MInstBuilder.h:1.1 Fri Oct 25 18:00:13 2002
+++ llvm/include/llvm/CodeGen/MInstBuilder.h Sun Oct 27 15:17:45 2002
@@ -34,6 +34,26 @@
return *this;
}
+ /// addSImm - Add a new sign extended immediate operand...
+ ///
+ MInstructionBuilder &addSImm(int Val) {
+ MI->addOperand(Val, MOperand::SignExtImmediate);
+ return *this;
+ }
+
+ /// addZImm - Add a new zero extended immediate operand...
+ ///
+ MInstructionBuilder &addZImm(unsigned Val) {
+ MI->addOperand(Val, MOperand::ZeroExtImmediate);
+ return *this;
+ }
+
+ /// addPCDisp - Add a PC Relative Displacement operand...
+ ///
+ MInstructionBuilder &addPCDisp(int Disp) {
+ MI->addOperand(Disp, MOperand::PCRelativeDisp);
+ return *this;
+ }
};
/// BuildMInst - Builder interface. Specify how to create the initial
More information about the llvm-commits
mailing list