diff options
author | Alan Zhao <ayzhao@google.com> | 2022-04-28 13:01:10 -0400 |
---|---|---|
committer | Eric Astor <epastor@google.com> | 2022-04-28 13:17:19 -0400 |
commit | 3333c28fc0dc0485e0e08b9d7039e0a501884b7a (patch) | |
tree | ae34e8f7a4fc75e1b6d8e18dd023db0150f3dfcb /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | a9215ed9cc904f05d02dc75f9f4680bf0b33965f (diff) | |
download | llvm-3333c28fc0dc0485e0e08b9d7039e0a501884b7a.zip llvm-3333c28fc0dc0485e0e08b9d7039e0a501884b7a.tar.gz llvm-3333c28fc0dc0485e0e08b9d7039e0a501884b7a.tar.bz2 |
[llvm-ml] Improve indirect call parsing
In MASM, if a QWORD symbol is passed to a jmp or call instruction in
64-bit mode or a DWORD or WORD symbol is passed in 32-bit mode, then
MSVC's assembler recognizes that as an indirect call. Additionally, if
the operand is qualified as a ptr, then that should also be an indirect
call.
Furthermore, in 64-bit mode, such operands are implicitly rip-relative
(in fact, MSVC's assembler ml64.exe does not allow explicitly specifying
rip as a base register.)
To keep this patch managable, this patch does not include:
* error messages for wrong operand types (e.g. passing a QWORD in 32-bit
mode)
* resolving indirect calls if the symbol is declared after it's first
use (llvm-ml currently only runs a single pass).
* imlementing the extern keyword (required to resolve
https://crbug.com/762167.)
This patch is likely missing a bunch of edge cases, so please do point
them out in the review.
Reviewed By: epastor, hans, MaskRay
Committed By: epastor (on behalf of ayzhao)
Differential Revision: https://reviews.llvm.org/D124413
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions