[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-08 Thread Alvin Wong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8cd90fd1a823: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only (authored by alvinhochun). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-07 Thread Alvin Wong via Phabricator via cfe-commits
alvinhochun updated this revision to Diff 520158. alvinhochun added a comment. Apply suggestions: remove TODO, put negative tests in the same file as positive tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149579/new/

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/MC/X86/intel-syntax-branch-fail.s:5 +// call [offset fn_ref] +// // TODO-CHECK: {{.*}}intel-syntax-branch-fail.s:[[#@LINE+-1]]:1: error: `OFFSET` operator cannot be used in an unconditional branch +// jmp [offset fn_ref]

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/MC/X86/intel-syntax-branch-fail.s:1 +// RUN: not llvm-mc -triple i686-unknown-unknown -x86-asm-syntax=intel %s 2>&1 | FileCheck %s + Don't create a separate test for negative tests. Use the `--defsym=ERR=1`

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:2662 +// TODO: Consider making the `call [offset fn_ref]` syntax an error? +#if 0 +if (!PtrInOperand && SM.isOffsetOperator()) I think this patch can be pushed now.

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149579/new/ https://reviews.llvm.org/D149579

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/MC/X86/intel-syntax-branch.s:61-67 + // FIXME: MASM does not accept this syntax and GAS assembles this as a direct + //call/jump instead of indirect. Consider making this syntax an error? + call [offset fn_ref] +

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-05 Thread Alvin Wong via Phabricator via cfe-commits
alvinhochun marked an inline comment as not done. alvinhochun added a comment. In D149579#4320765 , @MaskRay wrote: > OK. I think after D149695 (landed), > D149920 , and this patch

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-05 Thread Alvin Wong via Phabricator via cfe-commits
alvinhochun updated this revision to Diff 519869. alvinhochun edited the summary of this revision. alvinhochun added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rebase and add test cases with `offset` operator, and some TODOs/FIXMEs for comment Repository: