From 42184213e9a1ddb48b238d37aae1852a15c6c46b Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Sat, 23 Jan 2021 03:21:50 +0100 Subject: [PATCH] ppcexec: fix RC flag for subgroup 63. --- cpu/ppc/ppcexec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/ppc/ppcexec.cpp b/cpu/ppc/ppcexec.cpp index 224ae16..38fb6a2 100644 --- a/cpu/ppc/ppcexec.cpp +++ b/cpu/ppc/ppcexec.cpp @@ -220,8 +220,8 @@ void ppc_opcode59() { } void ppc_opcode63() { - uint16_t subop_grab = (ppc_cur_instruction & 0x7FF) >> 1; - rc_flag = subop_grab & 1; + uint16_t subop_grab = (ppc_cur_instruction >> 1) & 0x3FF; + rc_flag = ppc_cur_instruction & 1; #ifdef EXHAUSTIVE_DEBUG uint32_t regrab = (uint32_t)subop_grab; LOG_F(INFO, "Executing Opcode 63 table subopcode entry \n", regrab);