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/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) 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