mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-24 13:30:26 +00:00
poweropcodes: Fix more compiler warnings.
This commit is contained in:
parent
f08554758b
commit
ac0faf78fd
@ -454,7 +454,7 @@ void dppc_interpreter::power_sllq(uint32_t opcode) {
|
|||||||
if (ppc_result_b & 0x20) {
|
if (ppc_result_b & 0x20) {
|
||||||
ppc_result_a = ppc_state.spr[SPR::MQ] & (-1U << rot_sh);
|
ppc_result_a = ppc_state.spr[SPR::MQ] & (-1U << rot_sh);
|
||||||
} else {
|
} else {
|
||||||
ppc_result_a = ((ppc_result_d << rot_sh) | (ppc_state.spr[SPR::MQ] & ((1UL << rot_sh) - 1)));
|
ppc_result_a = ((ppc_result_d << rot_sh) | (ppc_state.spr[SPR::MQ] & ((1U << rot_sh) - 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rec)
|
if (rec)
|
||||||
@ -490,7 +490,7 @@ template void dppc_interpreter::power_slq<RC1>(uint32_t opcode);
|
|||||||
template <field_rc rec>
|
template <field_rc rec>
|
||||||
void dppc_interpreter::power_sraiq(uint32_t opcode) {
|
void dppc_interpreter::power_sraiq(uint32_t opcode) {
|
||||||
ppc_grab_regssash(opcode);
|
ppc_grab_regssash(opcode);
|
||||||
uint32_t mask = (1UL << rot_sh) - 1;
|
uint32_t mask = (1U << rot_sh) - 1;
|
||||||
ppc_result_a = (int32_t)ppc_result_d >> rot_sh;
|
ppc_result_a = (int32_t)ppc_result_d >> rot_sh;
|
||||||
ppc_state.spr[SPR::MQ] = rot_sh ? ((ppc_result_d >> rot_sh) | (ppc_result_d << (32 - rot_sh))) : ppc_result_d;
|
ppc_state.spr[SPR::MQ] = rot_sh ? ((ppc_result_d >> rot_sh) | (ppc_result_d << (32 - rot_sh))) : ppc_result_d;
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ template <field_rc rec>
|
|||||||
void dppc_interpreter::power_sraq(uint32_t opcode) {
|
void dppc_interpreter::power_sraq(uint32_t opcode) {
|
||||||
ppc_grab_regssab(opcode);
|
ppc_grab_regssab(opcode);
|
||||||
unsigned rot_sh = ppc_result_b & 0x1F;
|
unsigned rot_sh = ppc_result_b & 0x1F;
|
||||||
uint32_t mask = (ppc_result_b & 0x20) ? -1 : (1UL << rot_sh) - 1;
|
uint32_t mask = (ppc_result_b & 0x20) ? -1 : (1U << rot_sh) - 1;
|
||||||
ppc_result_a = (int32_t)ppc_result_d >> ((ppc_result_b & 0x20) ? 31 : rot_sh);
|
ppc_result_a = (int32_t)ppc_result_d >> ((ppc_result_b & 0x20) ? 31 : rot_sh);
|
||||||
ppc_state.spr[SPR::MQ] = rot_sh ? ((ppc_result_d << rot_sh) | (ppc_result_d >> (32 - rot_sh))) : ppc_result_d;
|
ppc_state.spr[SPR::MQ] = rot_sh ? ((ppc_result_d << rot_sh) | (ppc_result_d >> (32 - rot_sh))) : ppc_result_d;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user