Fixed ASL/ASR

This commit is contained in:
Rodolphe de Saint Léger 2025-05-19 15:27:30 +02:00
parent 7daa27e15f
commit b7910339a3
8 changed files with 49 additions and 25 deletions

View file

@ -74,6 +74,12 @@ public class InstructionTests extends TestCase {
public void testShift() {
CoreTest test = new CoreTest(0xffffff + 1, true);
test.executeBinTest("ASL.b");
test.executeBinTest("ASL.w");
test.executeBinTest("ASL.l");
test.executeBinTest("ASR.b");
test.executeBinTest("ASR.w");
test.executeBinTest("ASR.l");
test.executeBinTest("LSL.b");
test.executeBinTest("LSL.w");
test.executeBinTest("LSL.l");
@ -164,22 +170,13 @@ public class InstructionTests extends TestCase {
test.executeBinTest("MOVE.b");
/*
* 295 is not compatible (post incremented value is written by design) 342 is
* not compatible (post incremented value is written by design) 494 is not
* compatible (post incremented value is written by design) 994 is not
* compatible (pre decremented value is written by design) 1225 is not
* compatible (pre decremented value is written by design) 1846 is not
* compatible (post incremented value is written by design)
* skipped cases are incompatible (move address register to pre/post
* dec/increment with same address register)
*/
test.executeBinTest("MOVE.w", 295, 342, 494, 994, 1225, 1846);
/*
* 217 is not compatible (post incremented value is written by design) 502 is
* not compatible (post incremented value is written by design) 1152 is not
* compatible (post incremented value is written by design) 1691 is not
* compatible (post incremented value is written by design) 1830 is not
* compatible (pre decremented value is written by design) 2057 is not
* compatible (post incremented value is written by design) 2135 is not
* compatible (post incremented value is written by design)
* skipped cases are incompatible (move address register to pre/post
* dec/increment with same address register)
*/
test.executeBinTest("MOVE.l", 217, 502, 1152, 1691, 1830, 2057, 2135);
test.executeBinTest("MOVE.q");