From d188b5024f876c5a5dbb0fd31ebc7f07a67cfa25 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sat, 23 Feb 2019 19:02:25 +0100 Subject: [PATCH] one more missing optimization --- src/emucore/Thumbulator.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx index da16eb22e..42593a875 100644 --- a/src/emucore/Thumbulator.cxx +++ b/src/emucore/Thumbulator.cxx @@ -843,10 +843,14 @@ int Thumbulator::execute() #endif Op decodedOp; +#ifndef UNSAFE_OPTIMIZATIONS if ((instructionPtr & 0xF0000000) == 0 && instructionPtr < romSize) - decodedOp = decodedRom[instructionPtr / 2]; + decodedOp = decodedRom[instructionPtr >> 1]; else decodedOp = decodeInstructionWord(inst); +#else + decodedOp = decodedRom[instructionPtr >> 1]; +#endif switch (decodedOp) { //ADC