[llvm] r198762 - [x86] Add JMP_2 and other 16-bit PC-relative branch instructions

David Woodhouse dwmw2 at infradead.org
Wed Jan 8 04:58:36 PST 2014


Author: dwmw2
Date: Wed Jan  8 06:58:36 2014
New Revision: 198762

URL: http://llvm.org/viewvc/llvm-project?rev=198762&view=rev
Log:
[x86] Add JMP_2 and other 16-bit PC-relative branch instructions

Mark them as requiring 16-bit mode for now, since we don't yet have
relaxation support for FK_Data_2.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrControl.td

Modified: llvm/trunk/lib/Target/X86/X86InstrControl.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrControl.td?rev=198762&r1=198761&r2=198762&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrControl.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrControl.td Wed Jan  8 06:58:36 2014
@@ -52,6 +52,9 @@ let isTerminator = 1, isReturn = 1, isBa
 let isBarrier = 1, isBranch = 1, isTerminator = 1, SchedRW = [WriteJump] in {
   def JMP_4 : Ii32PCRel<0xE9, RawFrm, (outs), (ins brtarget:$dst),
                         "jmp\t$dst", [(br bb:$dst)], IIC_JMP_REL>, OpSize16;
+  def JMP_2 : Ii16PCRel<0xE9, RawFrm, (outs), (ins brtarget:$dst),
+                        "jmp\t$dst", [(br bb:$dst)], IIC_JMP_REL>, OpSize,
+                        Requires<[In16BitMode]>;
   let hasSideEffects = 0 in
   def JMP_1 : Ii8PCRel<0xEB, RawFrm, (outs), (ins brtarget8:$dst),
                        "jmp\t$dst", [], IIC_JMP_REL>;
@@ -63,6 +66,9 @@ let isBranch = 1, isTerminator = 1, Uses
     let hasSideEffects = 0 in
     def _1 : Ii8PCRel <opc1, RawFrm, (outs), (ins brtarget8:$dst), asm, [],
                        IIC_Jcc>;
+    def _2 : Ii16PCRel<opc4, RawFrm, (outs), (ins brtarget:$dst), asm,
+                       [(X86brcond bb:$dst, Cond, EFLAGS)], IIC_Jcc>, OpSize,
+		       TB, Requires<[In16BitMode]>;
     def _4 : Ii32PCRel<opc4, RawFrm, (outs), (ins brtarget:$dst), asm,
                        [(X86brcond bb:$dst, Cond, EFLAGS)], IIC_Jcc>, TB,
              OpSize16;





More information about the llvm-commits mailing list