fix(cpu): interim solution to weird program counter behaviour on illegal tst instruction
This commit is contained in:
parent
985fefb9f6
commit
6257418405
|
@ -85,6 +85,7 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
// TST
|
// TST
|
||||||
if (rd == 0xF) {
|
if (rd == 0xF) {
|
||||||
undefinedTestBehaviour(cpu);
|
undefinedTestBehaviour(cpu);
|
||||||
|
cpu.r[15] += 4; // FIXME: This is objectively wrong I think
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +96,7 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
// TEQ
|
// TEQ
|
||||||
if (rd == 0xF) {
|
if (rd == 0xF) {
|
||||||
undefinedTestBehaviour(cpu);
|
undefinedTestBehaviour(cpu);
|
||||||
|
cpu.r[15] += 4; // FIXME: This is objectively wrong I think
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +107,7 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
// CMP
|
// CMP
|
||||||
if (rd == 0xF) {
|
if (rd == 0xF) {
|
||||||
undefinedTestBehaviour(cpu);
|
undefinedTestBehaviour(cpu);
|
||||||
|
cpu.r[15] += 4; // FIXME: This is objectively wrong I think
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +122,7 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
|
||||||
// CMN
|
// CMN
|
||||||
if (rd == 0xF) {
|
if (rd == 0xF) {
|
||||||
undefinedTestBehaviour(cpu);
|
undefinedTestBehaviour(cpu);
|
||||||
|
cpu.r[15] += 4; // FIXME: This is objectively wrong I think
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue