Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix using unaddressable register
Always use EAX as the non-memory operand to the comparison. EAX is
always addressable as al, ax and eax which is not true for all registers
on x86.
  • Loading branch information
jakobbotsch committed Jul 7, 2022
commit fe666289a4569b44af038cf9ff5e1a5e9167b674
2 changes: 1 addition & 1 deletion src/coreclr/jit/codegenxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5122,7 +5122,7 @@ void CodeGen::genEmitCodeForUnusedIndir(GenTreeIndir* tree)
GenTree* addr = tree->Addr();
if (!addr->isContained())
{
GetEmitter()->emitIns_AR_R(INS_cmp, emitTypeSize(tree), addr->GetRegNum(), addr->GetRegNum(), 0);
GetEmitter()->emitIns_AR_R(INS_cmp, emitTypeSize(tree), REG_EAX, addr->GetRegNum(), 0);
return;
}

Expand Down