ppcopcodes: Fix subfic.

This commit is contained in:
joevt 2024-01-10 05:38:13 -08:00 committed by Maxim Poliakovski
parent 7432369162
commit 4430fd89a9
1 changed files with 4 additions and 1 deletions

View File

@ -331,7 +331,10 @@ void dppc_interpreter::ppc_subfc() {
void dppc_interpreter::ppc_subfic() {
ppc_grab_regsdasimm();
ppc_result_d = simm - ppc_result_a;
ppc_carry(~ppc_result_a, ppc_result_d);
if (simm == -1)
ppc_state.spr[SPR::XER] |= XER::CA;
else
ppc_carry(~ppc_result_a, ppc_result_d);
ppc_store_result_regd();
}