From 14a19c29ae22013032d81fa1203eae97576ce54b Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sat, 26 Oct 2024 23:11:43 +0200 Subject: [PATCH] Interpreter: Drop CPS implementation The decoding rule was incorrect and caused other instructions to be misinterpreted. Since this is effectively untested, the CPS handler is left unused for now. --- source/interpreter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/interpreter.cpp b/source/interpreter.cpp index 19165fb..7f07e2a 100644 --- a/source/interpreter.cpp +++ b/source/interpreter.cpp @@ -369,6 +369,7 @@ static uint32_t HandlerBranchExchange(InterpreterExecutionContext& ctx, ARM::ARM return target & ~UINT32_C(1); } +// TODO: Add decoding rule static uint32_t HandlerCPS(CPUContext& ctx, ARM::ARMInstr instr) { if (!EvalCond(ctx, instr.cond)) return NextInstr(ctx); @@ -1516,8 +1517,6 @@ static uint32_t Handler0001(InterpreterExecutionContext& ctx, ARM::ARMInstr inst } else { return HandlerBranchExchange(ctx, instr); } - } else if ((instr.raw & 0b1111'1111'0001'1111'1110'0010'0000) == 0b0001'0000'0000'0000'0000'0000'0000) { - return HandlerCPS(ctx, instr); } else if ((instr.raw & 0b1111'1011'1111'0000'1111'1111'1111) == 0b0001'0000'1111'0000'0000'0000'0000) { return HandlerMRS(ctx, instr); } else if ((instr.raw & 0b1111'1011'0000'1111'1111'1111'0000) == 0b0001'0010'0000'1111'0000'0000'0000) {