[llvm] [X86] Apply the data32 mode switch in the Intel matcher (PR #212417)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 06:43:50 PDT 2026
================
@@ -4600,6 +4601,20 @@ bool X86AsmParser::matchAndEmitIntelInstruction(
MCStreamer &Out, uint64_t &ErrorInfo, bool MatchingInlineAsm) {
X86Operand &Op = static_cast<X86Operand &>(*Operands[0]);
SMRange EmptyRange;
+ // In 16-bit mode, if data32 is specified, temporarily switch to 32-bit mode
+ // when matching the instruction. The mode must be restored before the
+ // instruction is emitted, or the 32-bit form loses its 0x66 prefix. Matching
+ // has several error returns, so a guard covers those.
----------------
phoebewang wrote:
Isn't there only one return in line 4715?
https://github.com/llvm/llvm-project/pull/212417
More information about the llvm-commits
mailing list