diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-27 21:17:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-27 21:17:45 +0000 |
commit | e4108ae577667c6711cc5d53178d702481cfa967 (patch) | |
tree | 48baa8e9f25c3ae866c03ac218aaaa47a4d98d18 | |
parent | c5291f5e0effd63757fa06ec773975e375d4f240 (diff) |
Add support or other operand types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4298 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/MInstBuilder.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MInstBuilder.h b/include/llvm/CodeGen/MInstBuilder.h index 6b0ba51fff..6ff5777503 100644 --- a/include/llvm/CodeGen/MInstBuilder.h +++ b/include/llvm/CodeGen/MInstBuilder.h @@ -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 |