[PATCH] D35846: [X86][Asm]Allow far jmp/call to be picked when using explicit FWORD size specifier
coby via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 08:35:49 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310485: [X86][Asm]Allow far jmp/call to be picked when using explicit FWORD sizeā¦ (authored by coby).
Changed prior to commit:
https://reviews.llvm.org/D35846?vs=109991&id=110406#toc
Repository:
rL LLVM
https://reviews.llvm.org/D35846
Files:
llvm/trunk/lib/Target/X86/X86InstrControl.td
llvm/trunk/test/MC/X86/intel-syntax.s
llvm/trunk/test/MC/X86/x86-64.s
Index: llvm/trunk/lib/Target/X86/X86InstrControl.td
===================================================================
--- llvm/trunk/lib/Target/X86/X86InstrControl.td
+++ llvm/trunk/lib/Target/X86/X86InstrControl.td
@@ -171,7 +171,7 @@
"ljmp{w}\t{*}$dst", [], IIC_JMP_FAR_MEM>, OpSize16,
Sched<[WriteJumpLd]>;
def FARJMP32m : I<0xFF, MRM5m, (outs), (ins opaque48mem:$dst),
- "ljmp{l}\t{*}$dst", [], IIC_JMP_FAR_MEM>, OpSize32,
+ "{l}jmp{l}\t{*}$dst", [], IIC_JMP_FAR_MEM>, OpSize32,
Sched<[WriteJumpLd]>;
}
@@ -233,7 +233,7 @@
"lcall{w}\t{*}$dst", [], IIC_CALL_FAR_MEM>, OpSize16,
Sched<[WriteJumpLd]>;
def FARCALL32m : I<0xFF, MRM3m, (outs), (ins opaque48mem:$dst),
- "lcall{l}\t{*}$dst", [], IIC_CALL_FAR_MEM>, OpSize32,
+ "{l}call{l}\t{*}$dst", [], IIC_CALL_FAR_MEM>, OpSize32,
Sched<[WriteJumpLd]>;
}
Index: llvm/trunk/test/MC/X86/x86-64.s
===================================================================
--- llvm/trunk/test/MC/X86/x86-64.s
+++ llvm/trunk/test/MC/X86/x86-64.s
@@ -394,11 +394,14 @@
sldt %ecx
sldt %cx
-// CHECK: lcalll *3135175374
-// CHECK: ljmpl *3135175374
-lcall *0xbadeface
-ljmp *0xbadeface
-
+// CHECK: lcalll *3135175374
+// CHECK: ljmpl *3135175374
+// CHECK: lcalll *(%rax)
+// CHECK: ljmpl *(%rax)
+lcall *0xbadeface
+ljmp *0xbadeface
+lcall *(%rax)
+ljmpl *(%rax)
// rdar://8444631
// CHECK: enter $31438, $0
Index: llvm/trunk/test/MC/X86/intel-syntax.s
===================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s
+++ llvm/trunk/test/MC/X86/intel-syntax.s
@@ -50,6 +50,15 @@
// CHECK: leaq 8(%rax), %rdx
lea RDX, [8 + RAX]
+// CHECK: lcalll *(%rax)
+ call FWORD ptr [rax]
+// CHECK: lcalll *(%rax)
+ lcall [rax]
+// CHECK: ljmpl *(%rax)
+ jmp FWORD ptr [rax]
+// CHECK: ljmpl *(%rax)
+ ljmp [rax]
+
// CHECK: movl $257, -4(%rsp)
mov DWORD PTR [RSP - 4], 257
// CHECK: movl $258, 4(%rsp)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35846.110406.patch
Type: text/x-patch
Size: 2141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170809/01ecaf3b/attachment.bin>
More information about the llvm-commits
mailing list