diff --git a/InstructionSets/x86/Implementation/PerformImplementation.hpp b/InstructionSets/x86/Implementation/PerformImplementation.hpp index ebabf7c1e..73f73097a 100644 --- a/InstructionSets/x86/Implementation/PerformImplementation.hpp +++ b/InstructionSets/x86/Implementation/PerformImplementation.hpp @@ -174,7 +174,8 @@ void adc(IntT &destination, IntT source, Status &status) { status.carry = Numeric::carried_out() - 1>(destination, source, result); status.auxiliary_carry = Numeric::carried_in<4>(destination, source, result); - status.sign = status.zero = status.parity = result; + status.sign = result & top_bit(); + status.zero = status.parity = result; status.overflow = overflow(destination, source, result); destination = result; @@ -192,7 +193,8 @@ void add(IntT &destination, IntT source, Status &status) { status.carry = Numeric::carried_out() - 1>(destination, source, result); status.auxiliary_carry = Numeric::carried_in<4>(destination, source, result); - status.sign = status.zero = status.parity = result; + status.sign = result & top_bit(); + status.zero = status.parity = result; status.overflow = overflow(destination, source, result); destination = result;