Make XER update code inline & private.

This commit is contained in:
Maxim Poliakovski 2020-02-09 08:01:26 +01:00
parent 49002860ed
commit 32e64fc1b2
2 changed files with 3 additions and 5 deletions

View File

@ -276,8 +276,6 @@ extern void ppc_store_result_rega();
extern void ppc_store_sfpresult(bool int_rep); extern void ppc_store_sfpresult(bool int_rep);
extern void ppc_store_dfpresult(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_changecrf0(uint32_t set_result);
void ppc_fp_changecrf1(); void ppc_fp_changecrf1();

View File

@ -156,8 +156,8 @@ void ppc_changecrf0(uint32_t set_result) {
} }
//Affects the XER register's Carry Bit //Affects the XER register's Carry Bit
void ppc_carry(uint32_t a, uint32_t b) { inline void ppc_carry(uint32_t a, uint32_t b) {
if (b < a) { // TODO: ensure it works everywhere if (b < a) {
ppc_state.ppc_spr[SPR::XER] |= 0x20000000UL; ppc_state.ppc_spr[SPR::XER] |= 0x20000000UL;
} }
else { 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) { 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; ppc_state.ppc_spr[SPR::XER] |= 0x20000000UL;
} }
else { else {