Fix broken unit tests

This commit is contained in:
Adrian Conlon committed 2026-06-05 22:25:30 +01:00
1 parent fe48576814
commit f79bdfd4a3
2 files changed
+11 -11

No files matched your search

+6 -6
View File
@@ -284,12 +284,12 @@ namespace EightBit {
return adjustSubtraction(before.joined, data.joined, after);
}
[[nodiscard]] constexpr auto LS() const { return carry() || zero(); } // (C OR Z)
[[nodiscard]] constexpr auto HI() const { return !LS(); } // !(C OR Z)
[[nodiscard]] constexpr auto LT() const { return (negative() >> 3) ^ (overflow() >> 1); } // (N XOR V)
[[nodiscard]] constexpr auto GE() const { return !LT(); } // !(N XOR V)
[[nodiscard]] constexpr auto LE() const { return zero() || LT(); } // (Z OR (N XOR V))
[[nodiscard]] constexpr auto GT() const { return !LE(); } // !(Z OR (N XOR V))
[[nodiscard]] constexpr auto LS() const { return carry() || zero(); } // (C OR Z)
[[nodiscard]] constexpr auto HI() const { return !LS(); } // !(C OR Z)
[[nodiscard]] constexpr auto LT() const { return (negativeFlag() >> 3) ^ (overflowFlag() >> 1); } // (N XOR V)
[[nodiscard]] constexpr auto GE() const { return !LT(); } // !(N XOR V)
[[nodiscard]] constexpr auto LE() const { return zero() || LT(); } // (Z OR (N XOR V))
[[nodiscard]] constexpr auto GT() const { return !LE(); } // !(Z OR (N XOR V))
#pragma region Load / store 8 or 16 - bit data
+5 -5
View File
@@ -1144,11 +1144,11 @@ void EightBit::mc6809::compare(register16_t operand, register16_t data) { compar
void EightBit::mc6809::compare(uint8_t operand, uint8_t data) { auto _ = subtract(operand, data); }
void EightBit::mc6809::CMPU() { compare(U(), BUS().DATA()); }
void EightBit::mc6809::CMPS() { compare(S(), BUS().DATA()); }
void EightBit::mc6809::CMPD() { compare(D(), BUS().DATA()); }
void EightBit::mc6809::CMPX() { compare(X(), BUS().DATA()); }
void EightBit::mc6809::CMPY() { compare(Y(), BUS().DATA()); }
void EightBit::mc6809::CMPU() { compare(U()); }
void EightBit::mc6809::CMPS() { compare(S()); }
void EightBit::mc6809::CMPD() { compare(D()); }
void EightBit::mc6809::CMPX() { compare(X()); }
void EightBit::mc6809::CMPY() { compare(Y()); }
void EightBit::mc6809::compare(register16_t operand) { auto _ = subtract(operand, intermediate()); }