From 449934e0f3b4a4acc02a4f576fe9ca496cc8edbb Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Tue, 13 Aug 2019 16:58:47 +0200 Subject: [PATCH] ppcopcodes: fix cror emulation. --- ppcopcodes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppcopcodes.cpp b/ppcopcodes.cpp index 7b4919f..cf41bab 100644 --- a/ppcopcodes.cpp +++ b/ppcopcodes.cpp @@ -1818,11 +1818,11 @@ void ppc_crnor(){ void ppc_cror(){ ppc_grab_regsdab(); - if ((ppc_state.ppc_cr && (0x80000000 >> reg_a)) | (ppc_state.ppc_cr && (0x80000000 >> reg_b))){ - ppc_state.ppc_cr |= (0x80000000 >> reg_d); + if ((ppc_state.ppc_cr & (0x80000000UL >> reg_a)) || (ppc_state.ppc_cr & (0x80000000UL >> reg_b))){ + ppc_state.ppc_cr |= (0x80000000UL >> reg_d); } else{ - ppc_state.ppc_cr &= ~(0x80000000 >> reg_d); + ppc_state.ppc_cr &= ~(0x80000000UL >> reg_d); } } void ppc_crorc(){