mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 16:31:31 +00:00
Corrected logical flags; now down to 68 failures, all of them on the ED page.
This commit is contained in:
parent
743eac8c55
commit
5a4d448cc1
@ -167,7 +167,7 @@ class FUSETests: XCTestCase {
|
||||
|
||||
let name = itemDictionary["name"] as! String
|
||||
|
||||
// if name != "ed40" {
|
||||
// if name != "a0" {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
|
@ -703,30 +703,30 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
||||
|
||||
#pragma mark - Logical
|
||||
|
||||
#define set_logical_flags(hf) \
|
||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_; \
|
||||
set_parity(a_); \
|
||||
half_carry_flag_ = hf; \
|
||||
subtract_flag_ = 0; \
|
||||
carry_flag_ = 0;
|
||||
|
||||
case MicroOp::And:
|
||||
a_ &= *(uint8_t *)operation->source;
|
||||
half_carry_flag_ = Flag::HalfCarry;
|
||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
||||
parity_overflow_flag_ = 0;
|
||||
set_parity(a_);
|
||||
set_logical_flags(Flag::HalfCarry);
|
||||
break;
|
||||
|
||||
case MicroOp::Or:
|
||||
a_ |= *(uint8_t *)operation->source;
|
||||
half_carry_flag_ = 0;
|
||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
||||
parity_overflow_flag_ = 0;
|
||||
set_parity(a_);
|
||||
set_logical_flags(0);
|
||||
break;
|
||||
|
||||
case MicroOp::Xor:
|
||||
a_ ^= *(uint8_t *)operation->source;
|
||||
half_carry_flag_ = 0;
|
||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
||||
parity_overflow_flag_ = 0;
|
||||
set_parity(a_);
|
||||
set_logical_flags(0);
|
||||
break;
|
||||
|
||||
#undef set_logical_flags
|
||||
|
||||
case MicroOp::CPL:
|
||||
a_ ^= 0xff;
|
||||
subtract_flag_ = Flag::Subtract;
|
||||
|
Loading…
Reference in New Issue
Block a user