1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-16 18:30:32 +00:00

Mostly fix LINK and UNLK.

This commit is contained in:
Thomas Harte 2022-05-04 08:41:55 -04:00
parent 5d1d94848c
commit 5aabe01b6d
2 changed files with 12 additions and 3 deletions

View File

@ -275,7 +275,6 @@ template <Model model, Operation t_operation = Operation::Undefined> uint8_t ope
case Operation::EORItoSR: case Operation::EORItoCCR:
case Operation::Bccb: case Operation::Bccw: case Operation::Bccl:
case Operation::BSRb: case Operation::BSRw: case Operation::BSRl:
case Operation::UNLINK:
return FetchOp1;
//
@ -294,6 +293,7 @@ template <Model model, Operation t_operation = Operation::Undefined> uint8_t ope
case Operation::NEGXb: case Operation::NEGXw: case Operation::NEGXl:
case Operation::EXTbtow: case Operation::EXTwtol:
case Operation::SWAP:
case Operation::UNLINK:
return FetchOp1 | StoreOp1;
//
@ -312,7 +312,6 @@ template <Model model, Operation t_operation = Operation::Undefined> uint8_t ope
case Operation::CMPb: case Operation::CMPw: case Operation::CMPl:
case Operation::CMPAw: case Operation::CMPAl:
case Operation::CHK:
case Operation::LINKw:
return FetchOp1 | FetchOp2;
//
@ -343,6 +342,7 @@ template <Model model, Operation t_operation = Operation::Undefined> uint8_t ope
// Two-operand; read both, write source.
//
case Operation::DBcc:
case Operation::LINKw:
return FetchOp1 | FetchOp2 | StoreOp1;
//

View File

@ -41,6 +41,15 @@
// eori_andi_ori
// lea
// Issues to fix:
//
// LINK A7, in which the post-operation writeback overwrites
// the modified value.
//
// Do I need a dedicated LINKA7 operation?
//
// This affects link_unlk
// Skipped for now, for implying a more granular decoder:
//
// btst_bchg_bclr_bset
@ -60,7 +69,7 @@
- (void)setUp {
// To limit tests run to a subset of files and/or of tests, uncomment and fill in below.
_fileSet = [NSSet setWithArray:@[@"link_unlk.json"]];
// _testSet = [NSSet setWithArray:@[@"EXT/EXTB 0031"]];
_testSet = [NSSet setWithArray:@[@"LINK.w 0007"]];
// _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]];
// _testSet = [NSSet setWithArray:@[@"CHK 41a8"]];
}