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

UserspaceEmulator: Fix incorrect SALC behavior

As @tzoz pointed out, SALC should set AL to 0xff when CF=1, not 0x01.

Fixes #2819.
This commit is contained in:
Andreas Kling 2020-07-16 00:49:33 +02:00
parent 323ec4c2ca
commit acfae91032

View file

@ -1560,7 +1560,7 @@ void SoftCPU::SAHF(const X86::Instruction&) { TODO(); }
void SoftCPU::SALC(const X86::Instruction&)
{
set_al(cf() ? 0x01 : 0x00);
set_al(cf() ? 0xff : 0x00);
if (m_secret_handshake_state < 2)
++m_secret_handshake_state;