mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Bcc: properly establish offset.
This commit is contained in:
parent
1304e930eb
commit
4b35899a12
@ -156,30 +156,30 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
|
||||
|
||||
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
|
||||
_fileSet = [NSSet setWithArray:@[
|
||||
// @"divu_divs.json",
|
||||
@"divu_divs.json",
|
||||
|
||||
// Below this line are passing tests.
|
||||
// @"abcd_sbcd.json",
|
||||
// @"add_sub.json",
|
||||
// @"addi_subi_cmpi.json",
|
||||
// @"addq_subq.json",
|
||||
// @"addx_subx.json",
|
||||
// @"bcc.json",
|
||||
// @"btst_bchg_bclr_bset.json",
|
||||
// @"chk.json",
|
||||
// @"cmp.json",
|
||||
@"abcd_sbcd.json",
|
||||
@"add_sub.json",
|
||||
@"addi_subi_cmpi.json",
|
||||
@"addq_subq.json",
|
||||
@"addx_subx.json",
|
||||
@"bcc.json",
|
||||
@"btst_bchg_bclr_bset.json",
|
||||
@"chk.json",
|
||||
@"cmp.json",
|
||||
@"dbcc_scc.json",
|
||||
// @"eor_and_or.json",
|
||||
// @"eori_andi_ori.json",
|
||||
// @"ext.json",
|
||||
// @"jsr.json",
|
||||
// @"movem.json",
|
||||
// @"movep.json",
|
||||
// @"nbcd.json",
|
||||
// @"ext.json",
|
||||
// @"swap.json",
|
||||
@"eor_and_or.json",
|
||||
@"eori_andi_ori.json",
|
||||
@"ext.json",
|
||||
@"jsr.json",
|
||||
@"movem.json",
|
||||
@"movep.json",
|
||||
@"nbcd.json",
|
||||
@"ext.json",
|
||||
@"swap.json",
|
||||
]]; // 19/32 = 59 % done, as far as the tests go.
|
||||
_testSet = [NSSet setWithArray:@[@"DBcc 0051"]];
|
||||
// _testSet = [NSSet setWithArray:@[@"Bcc 6000 [79]"]];
|
||||
}
|
||||
|
||||
- (void)testAll {
|
||||
|
@ -127,7 +127,8 @@ enum ExecutionState: int {
|
||||
DBcc_condition_true,
|
||||
DBcc_counter_overflow,
|
||||
|
||||
Bcc,
|
||||
Bcc_b,
|
||||
Bcc_w,
|
||||
Bcc_branch_taken,
|
||||
Bcc_b_branch_not_taken,
|
||||
Bcc_w_branch_not_taken,
|
||||
@ -592,8 +593,8 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
|
||||
StdCASE(DBcc, MoveToState(DBcc));
|
||||
|
||||
StdCASE(Bccb, perform_state_ = Bcc);
|
||||
StdCASE(Bccw, perform_state_ = Bcc);
|
||||
StdCASE(Bccb, MoveToState(Bcc_b));
|
||||
StdCASE(Bccw, MoveToState(Bcc_w));
|
||||
|
||||
StdCASE(BSRb, perform_state_ = BSR);
|
||||
StdCASE(BSRw, perform_state_ = BSR);
|
||||
@ -1449,7 +1450,18 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
//
|
||||
// Bcc [.b and .w]
|
||||
//
|
||||
BeginState(Bcc):
|
||||
BeginState(Bcc_b):
|
||||
operand_[0].b = uint8_t(opcode_);
|
||||
|
||||
InstructionSet::M68k::perform<InstructionSet::M68k::Model::M68000>(
|
||||
instruction_, operand_[0], operand_[1], status_, *static_cast<ProcessorBase *>(this));
|
||||
|
||||
// Next state was set by complete_bcc.
|
||||
break;
|
||||
|
||||
BeginState(Bcc_w):
|
||||
operand_[0].w = prefetch_.w;
|
||||
|
||||
InstructionSet::M68k::perform<InstructionSet::M68k::Model::M68000>(
|
||||
instruction_, operand_[0], operand_[1], status_, *static_cast<ProcessorBase *>(this));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user