mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-13 03:30:31 +00:00
poweropcodes: Fix rrib.
It is redundant to test bit 0 of rS and then use bit 0 of rS in the case when bit 0 of rS is set. In the case when bit 0 of rS is not set, using bit 0 or rS is incorrect since it results in no change of rA.
This commit is contained in:
parent
d897acfd3c
commit
e1f31a2da3
@ -365,11 +365,12 @@ void dppc_interpreter::power_rlmi() {
|
||||
template <field_rc rec>
|
||||
void dppc_interpreter::power_rrib() {
|
||||
ppc_grab_regssab(ppc_cur_instruction);
|
||||
unsigned rot_sh = ppc_result_b & 0x1F;
|
||||
|
||||
if (int32_t(ppc_result_d) < 0) {
|
||||
ppc_result_a |= ((ppc_result_d & 0x80000000) >> ppc_result_b);
|
||||
ppc_result_a |= (0x80000000U >> rot_sh);
|
||||
} else {
|
||||
ppc_result_a &= ~((ppc_result_d & 0x80000000) >> ppc_result_b);
|
||||
ppc_result_a &= ~(0x80000000U >> rot_sh);
|
||||
}
|
||||
|
||||
if (rec)
|
||||
|
Loading…
x
Reference in New Issue
Block a user