mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-13 03:30:31 +00:00
ppcopcodes: Fix subfe.
This commit is contained in:
parent
750f91e339
commit
4c49558120
@ -345,9 +345,12 @@ void dppc_interpreter::ppc_subfic() {
|
||||
|
||||
void dppc_interpreter::ppc_subfe() {
|
||||
ppc_grab_regsdab();
|
||||
uint32_t grab_xer = !!(ppc_state.spr[SPR::XER] & 0x20000000);
|
||||
ppc_result_d = ~ppc_result_a + ppc_result_b + grab_xer;
|
||||
ppc_carry(~ppc_result_a, ppc_result_d);
|
||||
uint32_t grab_ca = !!(ppc_state.spr[SPR::XER] & XER::CA);
|
||||
ppc_result_d = ~ppc_result_a + ppc_result_b + grab_ca;
|
||||
if (grab_ca && ppc_result_b == 0xFFFFFFFFUL)
|
||||
ppc_state.spr[SPR::XER] |= XER::CA;
|
||||
else
|
||||
ppc_carry(~ppc_result_a, ppc_result_d);
|
||||
|
||||
if (oe_flag)
|
||||
ppc_setsoov(ppc_result_b, ppc_result_a, ppc_result_d);
|
||||
|
Loading…
x
Reference in New Issue
Block a user