[PATCH] D144776: [X86][MC] Early bail out in emitREXPrefix, NFCI
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 25 04:01:55 PST 2023
skan marked an inline comment as done.
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1207
+ llvm_unreachable("Unexpected form in emitREXPrefix!");
+ case X86II::RawFrmMemOffs:
+ case X86II::RawFrmSrc:
----------------
pengfei wrote:
> Not sure others, but should this be unreachable too?
It is reachable b/c the format can have an implicit register operand. If we removed this, the following command would crash
echo "movabsq 0x123456789abcdef, %rax" | llvm-mc --show-encoding
where movabsq is MOV64ao64 in TD
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144776/new/
https://reviews.llvm.org/D144776
More information about the llvm-commits
mailing list