poweropcodes: Fix clcs.

For MPC601 CPUs, all values of rA return 64 though the manual says undefined values of rA produce undefined results.
For non-MPC601 CPUs, if this instruction is included (such as for risu DPPC) then return results that are obtained from a G4 running Mac OS 9.2.2.
This commit is contained in:
joevt 2024-04-09 01:12:41 -07:00 committed by dingusdev
parent 529f23d836
commit ff626ae0b5
1 changed files with 11 additions and 4 deletions

View File

@ -77,10 +77,17 @@ void dppc_interpreter::power_clcs() {
case 13: //data cache line size
case 14: //minimum line size
case 15: //maximum line size
ppc_result_d = 64;
break;
default:
ppc_result_d = 0;
default: ppc_result_d = is_601 ? 64 : 32; break;
case 7:
case 23: ppc_result_d = is_601 ? 64 : 0; break;
case 8:
case 9:
case 24:
case 25: ppc_result_d = is_601 ? 64 : 4; break;
case 10:
case 11:
case 26:
case 27: ppc_result_d = is_601 ? 64 : 0x4000; break;
}
ppc_store_iresult_reg(reg_d, ppc_result_d);