[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td X86RegisterInfo.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat May 14 16:35:38 PDT 2005
Changes in directory llvm/lib/Target/X86:
X86InstrInfo.td updated: 1.124 -> 1.125
X86RegisterInfo.cpp updated: 1.102 -> 1.103
---
Log message:
Add some new instructions
---
Diffs of the changes: (+17 -2)
X86InstrInfo.td | 7 +++++++
X86RegisterInfo.cpp | 12 ++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.124 llvm/lib/Target/X86/X86InstrInfo.td:1.125
--- llvm/lib/Target/X86/X86InstrInfo.td:1.124 Fri May 13 12:56:48 2005
+++ llvm/lib/Target/X86/X86InstrInfo.td Sat May 14 18:35:21 2005
@@ -191,6 +191,13 @@
def CALL32m : I<0xFF, MRM2m, (ops i32mem:$dst), "call {*}$dst">;
}
+// calltarget instead of i32imm?
+let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in
+ def TAILJMPd : IBr<0xE9, (ops i32imm:$dst), "jmp $dst">;
+let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in
+ def TAILJMPr : I<0xFF, MRM4r, (ops R32:$dst), "jmp {*}$dst">;
+let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1 in
+ def TAILJMPm : I<0xFF, MRM4m, (ops i32mem:$dst), "jmp {*}$dst">;
//===----------------------------------------------------------------------===//
// Miscellaneous Instructions...
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.102 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.103
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.102 Fri May 13 16:44:04 2005
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Sat May 14 18:35:21 2005
@@ -507,8 +507,16 @@
const MachineFrameInfo *MFI = MF.getFrameInfo();
MachineBasicBlock::iterator MBBI = prior(MBB.end());
MachineInstr *MI;
- assert((MBBI->getOpcode() == X86::RET || MBBI->getOpcode() == X86::RETI) &&
- "Can only insert epilog into returning blocks");
+
+ switch (MBBI->getOpcode()) {
+ case X86::RET:
+ case X86::RETI:
+ case X86::TAILJMPd:
+ case X86::TAILJMPr:
+ case X86::TAILJMPm: break; // These are ok
+ default:
+ assert(0 && "Can only insert epilog into returning blocks");
+ }
if (hasFP(MF)) {
// Get the offset of the stack slot for the EBP register... which is
More information about the llvm-commits
mailing list