1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

UserspaceEmulator: Fix XCHG_AX_reg16 overwriting entire EAX

This instruction should only write to the lower 16 bits (AX)
This commit is contained in:
Andreas Kling 2020-07-18 00:16:51 +02:00
parent 8959f9950a
commit becbf36711

View file

@ -2138,7 +2138,7 @@ void SoftCPU::XCHG_AX_reg16(const X86::Instruction& insn)
{
auto temp = gpr16(insn.reg16());
gpr16(insn.reg16()) = eax();
set_eax(temp);
set_ax(temp);
}
void SoftCPU::XCHG_EAX_reg32(const X86::Instruction& insn)