[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
Mon Aug 7 07:36:30 PDT 2017
coby updated this revision to Diff 109991.
coby added a comment.
> So should we test for it as well as the intel syntax?
Added some missing tests (intel & gnu)
Repository:
rL LLVM
https://reviews.llvm.org/D35846
Files:
lib/Target/X86/X86InstrControl.td
test/MC/X86/intel-syntax.s
test/MC/X86/x86-64.s
Index: lib/Target/X86/X86InstrControl.td
===================================================================
--- lib/Target/X86/X86InstrControl.td
+++ 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: test/MC/X86/x86-64.s
===================================================================
--- test/MC/X86/x86-64.s
+++ test/MC/X86/x86-64.s
@@ -396,9 +396,12 @@
// 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: test/MC/X86/intel-syntax.s
===================================================================
--- test/MC/X86/intel-syntax.s
+++ 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.109991.patch
Type: text/x-patch
Size: 1921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170807/92981f2d/attachment.bin>
More information about the llvm-commits
mailing list