mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-13 03:30:31 +00:00
poweropcodes: Fix slq.
Test bit 26 of rB instead of using >= 0x20 to determine which operation to perform. The two operations need to be switched such that rA is cleared when bit 26 is set. Don't forget to store the result in rA.
This commit is contained in:
parent
e8273ecc61
commit
2b8f510603
@ -479,16 +479,17 @@ void dppc_interpreter::power_slq() {
|
||||
ppc_grab_regssab(ppc_cur_instruction);
|
||||
unsigned rot_sh = ppc_result_b & 0x1F;
|
||||
|
||||
if (ppc_result_b >= 0x20) {
|
||||
ppc_result_a = ppc_result_d << rot_sh;
|
||||
} else {
|
||||
if (ppc_result_b & 0x20) {
|
||||
ppc_result_a = 0;
|
||||
} else {
|
||||
ppc_result_a = ppc_result_d << rot_sh;
|
||||
}
|
||||
|
||||
if (rec)
|
||||
ppc_changecrf0(ppc_result_a);
|
||||
|
||||
ppc_state.spr[SPR::MQ] = ((ppc_result_d << rot_sh) | (ppc_result_d >> (32 - rot_sh)));
|
||||
ppc_store_iresult_reg(reg_a, ppc_result_a);
|
||||
}
|
||||
|
||||
template void dppc_interpreter::power_slq<RC0>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user