The EXTERN keyword defines external symbols in MASM.
Credit goes to epastor@ for implementing most of the logic; I (ayzhao@)
added some bugfixes and tests.
[0]: https://docs.microsoft.com/en-us/cpp/assembler/masm/extern-masm?view=msvc-170
Paths
| Differential D125273
[llvm-ml] Imlement support for MASM's extern directive ClosedPublic Authored by ayzhao on May 9 2022, 3:09 PM.
Details Summary The EXTERN keyword defines external symbols in MASM. Credit goes to epastor@ for implementing most of the logic; I (ayzhao@) [0]: https://docs.microsoft.com/en-us/cpp/assembler/masm/extern-masm?view=msvc-170
Diff Detail
Event Timelineepastor added inline comments.
This revision is now accepted and ready to land.May 10 2022, 7:08 AM This revision was landed with ongoing or failed builds.May 10 2022, 11:36 AM Closed by commit rG82c5e302f9e6: [llvm-ml] Implement support for MASM's extern directive (authored by ayzhao, committed by epastor). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 428448 llvm/lib/MC/MCParser/MasmParser.cpp
llvm/test/tools/llvm-ml/extern.asm
llvm/test/tools/llvm-ml/extern_errors.asm
llvm/test/tools/llvm-ml/indirect_branch.asm
|
If feasible, we should test that the type info works correctly too - possibly by checking that they work in the appropriate contexts and fail in the appropriate contexts?
Just off the top of my head (and I may have this wrong, I didn't check)... I think:
mov ebx, foo
mov bx, bar
should both work, but
mov bx, foo
mov bl, bar
should both fail due to size checking.