This is an archive of the discontinued LLVM Phabricator instance.

[X86][MC] Reject `call`/`jmp [offset fn_ref]` in Intel syntax
ClosedPublic

Authored by alvinhochun on May 6 2023, 11:41 AM.

Details

Summary

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

Diff Detail

Event Timeline

alvinhochun created this revision.May 6 2023, 11:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2023, 11:41 AM
alvinhochun requested review of this revision.May 6 2023, 11:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2023, 11:41 AM
alvinhochun edited the summary of this revision. (Show Details)May 6 2023, 11:45 AM

See my comment D149579. You can surround the FIXME: MASM does not accept this syntax and GAS assembles this as a direct ... part with .ifdef ERR with llvm-mc ... --defsym ERR=1

MaskRay accepted this revision.May 6 2023, 1:08 PM

Looks great!

This revision is now accepted and ready to land.May 6 2023, 1:08 PM

Rebase and apply suggestions.