mirror of
https://bitbucket.org/rslr/miggy-cpu.git
synced 2026-06-13 03:26:29 +00:00
Fixed LSL/LSR/ROL/ROR
This commit is contained in:
parent
4aad8cbc96
commit
d2d7171a18
14 changed files with 70 additions and 57 deletions
|
|
@ -71,51 +71,60 @@ public class InstructionTests extends TestCase {
|
|||
test.executeBinTest("BTST");
|
||||
}
|
||||
|
||||
// public void testASL() {
|
||||
// CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
//
|
||||
// test.executeBinTest("ASL.b");
|
||||
// test.executeBinTest("ASL.w");
|
||||
// test.executeBinTest("ASL.l");
|
||||
// }
|
||||
public void testShift() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
|
||||
public void testBcc() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
|
||||
test.executeBinTest("Bcc", 373, 466, 570, 1547, 1695, 1782, 2166, 2224, 2441);
|
||||
test.executeBinTest("BSR", 25, 573, 814, 1357, 1443, 1509, 1734, 1934, 2232, 2338);
|
||||
}
|
||||
test.executeBinTest("LSL.b");
|
||||
test.executeBinTest("LSL.w");
|
||||
test.executeBinTest("LSL.l");
|
||||
test.executeBinTest("LSR.b");
|
||||
test.executeBinTest("LSR.w");
|
||||
test.executeBinTest("LSR.l");
|
||||
test.executeBinTest("ROL.b");
|
||||
test.executeBinTest("ROL.w");
|
||||
test.executeBinTest("ROL.l");
|
||||
test.executeBinTest("ROR.b");
|
||||
test.executeBinTest("ROR.w");
|
||||
test.executeBinTest("ROR.l");
|
||||
}
|
||||
|
||||
public void testDBcc() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
public void testBcc() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
|
||||
test.executeBinTest("DBcc");
|
||||
}
|
||||
test.executeBinTest("Bcc", 373, 466, 570, 1547, 1695, 1782, 2166, 2224, 2441);
|
||||
test.executeBinTest("BSR", 25, 573, 814, 1357, 1443, 1509, 1734, 1934, 2232, 2338);
|
||||
}
|
||||
|
||||
public void testMisc() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
public void testDBcc() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
|
||||
test.executeBinTest("NOP");
|
||||
test.executeBinTest("EXG");
|
||||
test.executeBinTest("SWAP");
|
||||
test.executeBinTest("EXT.w");
|
||||
test.executeBinTest("EXT.l");
|
||||
test.executeBinTest("LEA");
|
||||
test.executeBinTest("PEA");
|
||||
test.executeBinTest("RTS");
|
||||
test.executeBinTest("RTR");
|
||||
test.executeBinTest("LINK");
|
||||
test.executeBinTest("UNLINK");
|
||||
test.executeBinTest("Scc");
|
||||
test.executeBinTest("TST.b");
|
||||
test.executeBinTest("TST.w");
|
||||
test.executeBinTest("TST.l");
|
||||
test.executeBinTest("CLR.b");
|
||||
test.executeBinTest("CLR.w");
|
||||
test.executeBinTest("CLR.l");
|
||||
test.executeBinTest("TRAP");
|
||||
test.executeBinTest("TRAPV");
|
||||
}
|
||||
test.executeBinTest("DBcc");
|
||||
}
|
||||
|
||||
public void testMisc() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
|
||||
test.executeBinTest("NOP");
|
||||
test.executeBinTest("EXG");
|
||||
test.executeBinTest("SWAP");
|
||||
test.executeBinTest("EXT.w");
|
||||
test.executeBinTest("EXT.l");
|
||||
test.executeBinTest("LEA");
|
||||
test.executeBinTest("PEA");
|
||||
test.executeBinTest("RTS");
|
||||
test.executeBinTest("RTR");
|
||||
test.executeBinTest("LINK");
|
||||
test.executeBinTest("UNLINK");
|
||||
test.executeBinTest("Scc");
|
||||
test.executeBinTest("TST.b");
|
||||
test.executeBinTest("TST.w");
|
||||
test.executeBinTest("TST.l");
|
||||
test.executeBinTest("CLR.b");
|
||||
test.executeBinTest("CLR.w");
|
||||
test.executeBinTest("CLR.l");
|
||||
test.executeBinTest("TRAP");
|
||||
test.executeBinTest("TRAPV");
|
||||
}
|
||||
|
||||
public void testJMP() {
|
||||
CoreTest test = new CoreTest(0xffffff + 1, true);
|
||||
|
|
@ -153,26 +162,26 @@ 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)
|
||||
* 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)
|
||||
*/
|
||||
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)
|
||||
* 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)
|
||||
*/
|
||||
test.executeBinTest("MOVE.l", 217, 502, 1152, 1691, 1830, 2057, 2135);
|
||||
test.executeBinTest("MOVE.q");
|
||||
|
||||
|
||||
test.executeBinTest("MOVEP.w");
|
||||
test.executeBinTest("MOVEP.l");
|
||||
|
||||
|
|
@ -181,7 +190,7 @@ public class InstructionTests extends TestCase {
|
|||
|
||||
test.executeBinTest("MOVEM.w");
|
||||
test.executeBinTest("MOVEM.l");
|
||||
|
||||
|
||||
test.executeBinTest("MOVEtoCCR");
|
||||
test.executeBinTest("MOVEtoUSP");
|
||||
test.executeBinTest("MOVEfromUSP");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue