[X86][MC] Reject `call`/`jmp [offset fn_ref]` in Intel syntax
authorAlvin Wong <alvin@alvinhc.com>
Sat, 6 May 2023 18:28:44 +0000 (02:28 +0800)
committerAlvin Wong <alvin@alvinhc.com>
Mon, 8 May 2023 16:07:40 +0000 (00:07 +0800)
commit0ecd2e50146dd4dfac47b20a8e03e43a015b55ce
tree2c83823811c59eb47b4bde7e30c8c40a2ddba75e
parent6b996282cee3588e46b18c30957e71c964012e14
[X86][MC] Reject `call`/`jmp [offset fn_ref]` in Intel syntax

This syntax is confusing and likely invalid. In addition, MASM rejects
it and GAS seems to behave oddly with it. Therefore we shall reject this
syntax for both unconditional `call` and `jmp` instructions, as
discussed in D149579.

Depends on D150047

Differential Revision: https://reviews.llvm.org/D150048
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/test/MC/X86/intel-syntax-branch.s