From 32e64fc1b287046a8558be1c7cfcc08a50908c8a Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Sun, 9 Feb 2020 08:01:26 +0100 Subject: [PATCH] Make XER update code inline & private. --- cpu/ppc/ppcemu.h | 2 -- cpu/ppc/ppcopcodes.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cpu/ppc/ppcemu.h b/cpu/ppc/ppcemu.h index 9384bb8..ed701d6 100644 --- a/cpu/ppc/ppcemu.h +++ b/cpu/ppc/ppcemu.h @@ -276,8 +276,6 @@ extern void ppc_store_result_rega(); extern void ppc_store_sfpresult(bool int_rep); extern void ppc_store_dfpresult(bool int_rep); -void ppc_carry(uint32_t a, uint32_t b); -void ppc_setsoov(uint32_t a, uint32_t b, uint32_t d); void ppc_changecrf0(uint32_t set_result); void ppc_fp_changecrf1(); diff --git a/cpu/ppc/ppcopcodes.cpp b/cpu/ppc/ppcopcodes.cpp index 568a42c..44d60bf 100644 --- a/cpu/ppc/ppcopcodes.cpp +++ b/cpu/ppc/ppcopcodes.cpp @@ -156,8 +156,8 @@ void ppc_changecrf0(uint32_t set_result) { } //Affects the XER register's Carry Bit -void ppc_carry(uint32_t a, uint32_t b) { - if (b < a) { // TODO: ensure it works everywhere +inline void ppc_carry(uint32_t a, uint32_t b) { + if (b < a) { ppc_state.ppc_spr[SPR::XER] |= 0x20000000UL; } else { @@ -166,7 +166,7 @@ void ppc_carry(uint32_t a, uint32_t b) { } inline void ppc_carry_sub(uint32_t a, uint32_t b) { - if (b >= a) { // TODO: ensure it works everywhere + if (b >= a) { ppc_state.ppc_spr[SPR::XER] |= 0x20000000UL; } else {