mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-24 13:30:26 +00:00
poweropcodes: Fix sraq.
If bit 26 of rB is set then the mask should be all ones. If bit 26 of rB is set then rA should be all ones or all zeros (depending on the sign bit of rA).
This commit is contained in:
parent
2b8f510603
commit
a928c67913
@ -521,8 +521,8 @@ template <field_rc rec>
|
||||
void dppc_interpreter::power_sraq() {
|
||||
ppc_grab_regssab(ppc_cur_instruction);
|
||||
unsigned rot_sh = ppc_result_b & 0x1F;
|
||||
uint32_t mask = (1 << rot_sh) - 1;
|
||||
ppc_result_a = (int32_t)ppc_result_d >> rot_sh;
|
||||
uint32_t mask = (ppc_result_b & 0x20) ? -1 : (1 << rot_sh) - 1;
|
||||
ppc_result_a = (int32_t)ppc_result_d >> ((ppc_result_b & 0x20) ? 31 : rot_sh);
|
||||
ppc_state.spr[SPR::MQ] = ((ppc_result_d << rot_sh) | (ppc_result_d >> (32 - rot_sh)));
|
||||
|
||||
if ((int32_t(ppc_result_d) < 0) && (ppc_result_d & mask)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user