diff --git a/InstructionSets/x86/Implementation/PerformImplementation.hpp b/InstructionSets/x86/Implementation/PerformImplementation.hpp index 593980bf0..bd36a79cd 100644 --- a/InstructionSets/x86/Implementation/PerformImplementation.hpp +++ b/InstructionSets/x86/Implementation/PerformImplementation.hpp @@ -172,7 +172,7 @@ template constexpr int bit_size() { /// and the result was @c result. All other bits will be clear. template IntT overflow(IntT lhs, IntT rhs, IntT result) { - const IntT output_changed = result ^ rhs; + const IntT output_changed = result ^ lhs; const IntT input_differed = lhs ^ rhs; if constexpr (is_add) { @@ -181,6 +181,8 @@ IntT overflow(IntT lhs, IntT rhs, IntT result) { return top_bit() & output_changed & input_differed; } } +// NOTE TO FUTURE SELF: the original 68k `overflow` treats lhs and rhs the other way +// around, affecting subtractive overflow. Be careful. // // END COPY AND PASTE SECTION. diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index 8c0831006..00ab3b4b8 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -304,12 +304,12 @@ struct FailedExecution { // @"80.0.json.gz", @"81.0.json.gz", @"83.0.json.gz", // SBB -// @"18.json.gz", @"19.json.gz", @"1A.json.gz", @"1B.json.gz", @"1C.json.gz", @"1D.json.gz", -// @"80.3.json.gz", @"81.3.json.gz", @"83.3.json.gz", + @"18.json.gz", @"19.json.gz", @"1A.json.gz", @"1B.json.gz", @"1C.json.gz", @"1D.json.gz", + @"80.3.json.gz", @"81.3.json.gz", @"83.3.json.gz", // SUB - @"28.json.gz", //@"29.json.gz", @"2A.json.gz", @"2B.json.gz", @"2C.json.gz", @"2D.json.gz", -// @"80.5.json.gz", @"81.5.json.gz", @"83.5.json.gz", + @"28.json.gz", @"29.json.gz", @"2A.json.gz", @"2B.json.gz", @"2C.json.gz", @"2D.json.gz", + @"80.5.json.gz", @"81.5.json.gz", @"83.5.json.gz", // AND // @"20.json.gz", @"21.json.gz", @"22.json.gz", @"23.json.gz", @"24.json.gz", @"25.json.gz",