poweropcodes: Fix nabs.

Calculate overflow first before calculating condition codes because the overflow condition is copied from XER.
This commit is contained in:
joevt 2024-04-09 02:04:32 -07:00 committed by dingusdev
parent 1e57ac408a
commit d897acfd3c

View File

@ -332,10 +332,10 @@ void dppc_interpreter::power_nabs() {
ppc_grab_regsda(ppc_cur_instruction);
uint32_t ppc_result_d = (int32_t(ppc_result_a) < 0) ? ppc_result_a : -ppc_result_a;
if (rec)
ppc_changecrf0(ppc_result_d);
if (ov)
ppc_state.spr[SPR::XER] &= ~XER::OV;
if (rec)
ppc_changecrf0(ppc_result_d);
ppc_store_iresult_reg(reg_d, ppc_result_d);
}