1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-19 23:29:05 +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::EORItoSR: case Operation::EORItoCCR:
case Operation::Bccb: case Operation::Bccw: case Operation::Bccl: case Operation::Bccb: case Operation::Bccw: case Operation::Bccl:
case Operation::BSRb: case Operation::BSRw: case Operation::BSRl: case Operation::BSRb: case Operation::BSRw: case Operation::BSRl:
case Operation::UNLINK:
return FetchOp1; 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::NEGXb: case Operation::NEGXw: case Operation::NEGXl:
case Operation::EXTbtow: case Operation::EXTwtol: case Operation::EXTbtow: case Operation::EXTwtol:
case Operation::SWAP: case Operation::SWAP:
case Operation::UNLINK:
return FetchOp1 | StoreOp1; 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::CMPb: case Operation::CMPw: case Operation::CMPl:
case Operation::CMPAw: case Operation::CMPAl: case Operation::CMPAw: case Operation::CMPAl:
case Operation::CHK: case Operation::CHK:
case Operation::LINKw:
return FetchOp1 | FetchOp2; return FetchOp1 | FetchOp2;
// //
@ -343,6 +342,7 @@ template <Model model, Operation t_operation = Operation::Undefined> uint8_t ope
// Two-operand; read both, write source. // Two-operand; read both, write source.
// //
case Operation::DBcc: case Operation::DBcc:
case Operation::LINKw:
return FetchOp1 | FetchOp2 | StoreOp1; return FetchOp1 | FetchOp2 | StoreOp1;
// //

View File

@ -41,6 +41,15 @@
// eori_andi_ori // eori_andi_ori
// lea // 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: // Skipped for now, for implying a more granular decoder:
// //
// btst_bchg_bclr_bset // btst_bchg_bclr_bset
@ -60,7 +69,7 @@
- (void)setUp { - (void)setUp {
// 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:@[@"link_unlk.json"]]; _fileSet = [NSSet setWithArray:@[@"link_unlk.json"]];
// _testSet = [NSSet setWithArray:@[@"EXT/EXTB 0031"]]; _testSet = [NSSet setWithArray:@[@"LINK.w 0007"]];
// _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]]; // _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]];
// _testSet = [NSSet setWithArray:@[@"CHK 41a8"]]; // _testSet = [NSSet setWithArray:@[@"CHK 41a8"]];
} }