[x86] Fix disassembly of callw instruction
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 20 Jan 2014 12:02:40 +0000 (12:02 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 20 Jan 2014 12:02:40 +0000 (12:02 +0000)
Not quite sure why this was marked isAsmParserOnly, but it means that the
disassembler can't see it either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199651 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrControl.td
test/MC/Disassembler/X86/x86-16.txt

index 98a897af323cb458d2c11054927b1f112906091a..7295cf1b8d5e35b39ca41eb0eab2bf6ef87c8f3a 100644 (file)
@@ -186,6 +186,10 @@ let isCall = 1 in
                            (outs), (ins i32imm_pcrel:$dst),
                            "call{l}\t$dst", [], IIC_CALL_RI>, OpSize16,
                       Requires<[Not64BitMode]>, Sched<[WriteJump]>;
+    def CALLpcrel16 : Ii16PCRel<0xE8, RawFrm,
+                           (outs), (ins i16imm_pcrel:$dst),
+                           "call{w}\t$dst", [], IIC_CALL_RI>, OpSize,
+                      Sched<[WriteJump]>;
     def CALL16r     : I<0xFF, MRM2r, (outs), (ins GR16:$dst),
                         "call{w}\t{*}$dst", [(X86call GR16:$dst)], IIC_CALL_RI>,
                       OpSize, Requires<[Not64BitMode]>, Sched<[WriteJump]>;
@@ -218,12 +222,6 @@ let isCall = 1 in
     def FARCALL32m  : I<0xFF, MRM3m, (outs), (ins opaque48mem:$dst),
                         "lcall{l}\t{*}$dst", [], IIC_CALL_FAR_MEM>, OpSize16,
                       Sched<[WriteJumpLd]>;
-
-    // callw for 16 bit code for the assembler.
-    let isAsmParserOnly = 1 in
-      def CALLpcrel16 : Ii16PCRel<0xE8, RawFrm,
-                       (outs), (ins i16imm_pcrel:$dst),
-                       "callw\t$dst", []>, OpSize;
   }
 
 
index eef8723c9a260660c2279c4efd37b116208a1486..50d79c161fcf53599e9092b1ed536d96a34f7603 100644 (file)
 # CHECK: calll 
 0x66 0xe8 0x00 0x00 0x00 0x00
 
-# CHECKX: callw
-#0xe8 0x00 0x00
+# CHECK: callw
+0xe8 0x00 0x00
 
 # CHECK: incb %al
 0xfe 0xc0