mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Fix SUB. SBB still failing.
This commit is contained in:
@@ -172,7 +172,7 @@ template <typename IntT> constexpr int bit_size() {
|
|||||||
/// and the result was @c result. All other bits will be clear.
|
/// and the result was @c result. All other bits will be clear.
|
||||||
template <bool is_add, typename IntT>
|
template <bool is_add, typename IntT>
|
||||||
IntT overflow(IntT lhs, IntT rhs, IntT result) {
|
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;
|
const IntT input_differed = lhs ^ rhs;
|
||||||
|
|
||||||
if constexpr (is_add) {
|
if constexpr (is_add) {
|
||||||
@@ -181,6 +181,8 @@ IntT overflow(IntT lhs, IntT rhs, IntT result) {
|
|||||||
return top_bit<IntT>() & output_changed & input_differed;
|
return top_bit<IntT>() & 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.
|
// END COPY AND PASTE SECTION.
|
||||||
|
@@ -304,12 +304,12 @@ struct FailedExecution {
|
|||||||
// @"80.0.json.gz", @"81.0.json.gz", @"83.0.json.gz",
|
// @"80.0.json.gz", @"81.0.json.gz", @"83.0.json.gz",
|
||||||
|
|
||||||
// SBB
|
// SBB
|
||||||
// @"18.json.gz", @"19.json.gz", @"1A.json.gz", @"1B.json.gz", @"1C.json.gz", @"1D.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",
|
@"80.3.json.gz", @"81.3.json.gz", @"83.3.json.gz",
|
||||||
|
|
||||||
// SUB
|
// SUB
|
||||||
@"28.json.gz", //@"29.json.gz", @"2A.json.gz", @"2B.json.gz", @"2C.json.gz", @"2D.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",
|
@"80.5.json.gz", @"81.5.json.gz", @"83.5.json.gz",
|
||||||
|
|
||||||
// AND
|
// AND
|
||||||
// @"20.json.gz", @"21.json.gz", @"22.json.gz", @"23.json.gz", @"24.json.gz", @"25.json.gz",
|
// @"20.json.gz", @"21.json.gz", @"22.json.gz", @"23.json.gz", @"24.json.gz", @"25.json.gz",
|
||||||
|
Reference in New Issue
Block a user