mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 23:29:05 +00:00
Fix LINK A7.
This commit is contained in:
parent
98325325b1
commit
a87f6a28c9
@ -156,7 +156,7 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
|
|||||||
|
|
||||||
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
|
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
|
||||||
// _fileSet = [NSSet setWithArray:@[@"abcd_sbcd.json"]];
|
// _fileSet = [NSSet setWithArray:@[@"abcd_sbcd.json"]];
|
||||||
// _testSet = [NSSet setWithArray:@[@"UNLK 0007"]];
|
// _testSet = [NSSet setWithArray:@[@"LINK.w 0007"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testAll {
|
- (void)testAll {
|
||||||
|
@ -2120,8 +2120,20 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
|||||||
//
|
//
|
||||||
BeginState(LINK):
|
BeginState(LINK):
|
||||||
Prefetch();
|
Prefetch();
|
||||||
Push(registers_[8 + instruction_.reg(0)]);
|
|
||||||
registers_[8 + instruction_.reg(0)].l = registers_[15].l + uint32_t(int16_t(prefetch_.high.w));
|
// Ensure that the stack pointer is [seemingly] captured after
|
||||||
|
// having been decremented by four, if it's what should be captured.
|
||||||
|
registers_[15].l -= 4;
|
||||||
|
temporary_address_ = registers_[8 + instruction_.reg(0)];
|
||||||
|
registers_[15].l += 4;
|
||||||
|
|
||||||
|
// Push will actually decrement the stack pointer.
|
||||||
|
Push(temporary_address_);
|
||||||
|
|
||||||
|
// Make the exchange.
|
||||||
|
registers_[8 + instruction_.reg(0)].l = registers_[15].l;
|
||||||
|
registers_[15].l += uint32_t(int16_t(prefetch_.high.w));
|
||||||
|
|
||||||
Prefetch();
|
Prefetch();
|
||||||
MoveToStateSpecific(Decode);
|
MoveToStateSpecific(Decode);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user