diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2002-11-14 22:32:30 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2002-11-14 22:32:30 +0000 |
commit | 6559bb96a9901af21c6037675f9508373773bd35 (patch) | |
tree | a56a26a6c9180f3504a02ab0f1b14617daf50ddc /include/llvm/CodeGen/MachineInstrBuilder.h | |
parent | e555460e4e47458e99801c7ab0f85cfdf80583a0 (diff) |
include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
convenience method. Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
Take out LEAVE instructions.
32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
Add some simple code to Printer::runOnFunction to iterate over
MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
implicit defs "Void". Add more sign/zero extending "move" insns
(movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstrBuilder.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstrBuilder.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h index d594d1b025..a360be6de3 100644 --- a/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/include/llvm/CodeGen/MachineInstrBuilder.h @@ -34,13 +34,22 @@ struct MachineInstrBuilder { return *this; } - /// addReg - Add an LLVM value that is to be used as a register...x + /// addReg - Add an LLVM value that is to be used as a register... /// MachineInstrBuilder &addReg(Value *V, bool isDef = false, bool isDNU = false){ MI->addRegOperand(V, isDef, isDNU); return *this; } + /// addClobber - Assert that this MI is going to clobber a specific + /// register. Useful for instructions that always clobber certain hard regs. + /// (Same as addReg(RegNo, true) but shorter and more obvious). + /// + MachineInstrBuilder &addClobber(int RegNo) { + MI->addRegOperand(RegNo, true); + return *this; + } + /// addPCDisp - Add an LLVM value to be treated as a PC relative /// displacement... /// |