aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86InstrInfo.td
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-11 06:59:12 +0000
committerChris Lattner <sabre@nondot.org>2004-08-11 06:59:12 +0000
commite4ead0ce62ce90803f4c1c689a0c3bc6bdb876a7 (patch)
tree077e9f88dc411b514f5e3d345ca9076b2bbbf555 /lib/Target/X86/X86InstrInfo.td
parent8198fcfc5dfcf4df50d30f9ceafcaf7c93a7c827 (diff)
downloadexternal_llvm-e4ead0ce62ce90803f4c1c689a0c3bc6bdb876a7.zip
external_llvm-e4ead0ce62ce90803f4c1c689a0c3bc6bdb876a7.tar.gz
external_llvm-e4ead0ce62ce90803f4c1c689a0c3bc6bdb876a7.tar.bz2
Add asmprintergen support for the last X86 instruction that needs it: pcrelative calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrInfo.td')
-rw-r--r--lib/Target/X86/X86InstrInfo.td6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 420329f..7dd4a56 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -29,6 +29,10 @@ def f32mem : X86MemOperand<f32>;
def f64mem : X86MemOperand<f64>;
def f80mem : X86MemOperand<f80>;
+// PCRelative calls need special operand formatting.
+let PrintMethod = "printCallOperand" in
+ def calltarget : Operand<i32>;
+
// Format specifies the encoding used by the instruction. This is part of the
// ad-hoc solution used to emit machine instruction encodings by our machine
// code emitter.
@@ -196,7 +200,7 @@ def JG : IBr<0x8F, (ops i32imm:$dst), "jg $dst">, TB;
let isCall = 1 in
// All calls clobber the non-callee saved registers...
let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP5, FP6] in {
- def CALLpcrel32 : X86Inst<"call", 0xE8, RawFrm, NoMem, NoImm>; // FIXME: 'call' doesn't allow 'OFFSET'
+ def CALLpcrel32 : I<0xE8, RawFrm, (ops calltarget:$dst), "call $dst">;
def CALL32r : I<0xFF, MRM2r, (ops R32:$dst), "call $dst">;
def CALL32m : I<0xFF, MRM2m, (ops i32mem:$dst), "call $dst">;
}