From de61c26484b18d5967b2802dd3815c9c6fb19735 Mon Sep 17 00:00:00 2001 From: dingusdev <52434309+dingusdev@users.noreply.github.com> Date: Tue, 24 Sep 2024 06:38:38 -0700 Subject: [PATCH] More fixes --- cpu/ppc/poweropcodes.cpp | 12 ++++++------ cpu/ppc/ppcemu.h | 16 ---------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/cpu/ppc/poweropcodes.cpp b/cpu/ppc/poweropcodes.cpp index bd7cdfb..6d5c22d 100644 --- a/cpu/ppc/poweropcodes.cpp +++ b/cpu/ppc/poweropcodes.cpp @@ -44,7 +44,7 @@ POWEROPCODEOVREC (abs, } else { ppc_result_d = (int32_t(ppc_result_a) < 0) ? -ppc_result_a : ppc_result_a; if (ov) - ppc_unset_xer(XER::SO | XER::OV); + ppc_unset_xer(XER::OV); } if (rec) @@ -114,7 +114,7 @@ POWEROPCODEOVREC (div, if (((quotient >> 31) + 1) & ~1) { ppc_set_xer(XER::SO | XER::OV); } else { - ppc_unset_xer(XER::SO | XER::OV); + ppc_unset_xer(XER::OV); } } } @@ -150,7 +150,7 @@ POWEROPCODEOVREC (divs, ppc_result_d = int32_t(ppc_result_a) / int32_t(ppc_result_b); remainder = (int32_t(ppc_result_a) % int32_t(ppc_result_b)); if (ov) - ppc_unset_xer(XER::SO | XER::OV); + ppc_unset_xer(XER::OV); } if (rec) ppc_changecrf0(remainder); @@ -173,7 +173,7 @@ POWEROPCODEOVREC (doz, if (int32_t(ppc_result_d) < 0) { ppc_set_xer(XER::SO | XER::OV); } else { - ppc_unset_xer(XER::SO | XER::OV); + ppc_unset_xer(XER::OV); } } if (rec) @@ -301,7 +301,7 @@ POWEROPCODEOVREC (mul, if (uint64_t(product >> 31) + 1 & ~1) { ppc_set_xer(XER::SO | XER::OV); } else { - ppc_unset_xer(XER::SO | XER::OV); + ppc_unset_xer(XER::OV); } } if (rec) @@ -319,7 +319,7 @@ POWEROPCODEOVREC (nabs, uint32_t ppc_result_d = (int32_t(ppc_result_a) < 0) ? ppc_result_a : -ppc_result_a; if (ov) - ppc_unset_xer(XER::SO | XER::OV); + ppc_unset_xer(XER::OV); if (rec) ppc_changecrf0(ppc_result_d); diff --git a/cpu/ppc/ppcemu.h b/cpu/ppc/ppcemu.h index 1ca0884..dddc4fe 100644 --- a/cpu/ppc/ppcemu.h +++ b/cpu/ppc/ppcemu.h @@ -633,110 +633,94 @@ template void power_srq(uint32_t instr); // G5+ instructions -#undef OPCODE #define OPCODE(op, ...) \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ ##__VA_ARGS__ \ } -#undef POWEROPCODE #define POWEROPCODE(op, ...) \ void dppc_interpreter::power_##op(uint32_t instr) { \ ##__VA_ARGS__ \ } -#undef OPCODESHIFT #define OPCODESHIFT(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODESHIFTREC #define OPCODESHIFTREC(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODECARRY #define OPCODECARRY(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODEOVREC #define OPCODEOVREC(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODEEXTSIGN #define OPCODEEXTSIGN(op, ...)\ template \ void dppc_interpreter::ppc_##op(uint32_t instr) {\ __VA_ARGS__ \ } -#undef POWEROPCODEOVREC #define POWEROPCODEOVREC(op, ...) \ template \ void dppc_interpreter::power_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODEREC #define OPCODEREC(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef POWEROPCODEREC #define POWEROPCODEREC(op, ...) \ template \ void dppc_interpreter::power_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODELOGIC #define OPCODELOGIC(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODELKAA #define OPCODELKAA(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODEMEM #define OPCODEMEM(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODE601REC #define OPCODE601REC(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODE601L #define OPCODE601L(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \ __VA_ARGS__ \ } -#undef OPCODEL #define OPCODEL(op, ...) \ template \ void dppc_interpreter::ppc_##op(uint32_t instr) { \