Add support or other operand types
authorChris Lattner <sabre@nondot.org>
Sun, 27 Oct 2002 21:17:45 +0000 (21:17 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 27 Oct 2002 21:17:45 +0000 (21:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4298 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MInstBuilder.h

index 6b0ba51fff722d7187cc7cc8e16d84aa1d0d958f..6ff5777503acabd3dc303273a7cdddcbd52cb678 100644 (file)
@@ -34,6 +34,26 @@ struct MInstructionBuilder {
     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