From ae66b39dac6eef87ec83278399ffebf7db8548fb Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sat, 25 Aug 2018 12:51:43 +0100 Subject: [PATCH] Add a couple of LIKELY/UNLIKELY specifications to the 6809 processor. Signed-off-by: Adrian Conlon --- MC6809/src/mc6809.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MC6809/src/mc6809.cpp b/MC6809/src/mc6809.cpp index 8959941..f722ab8 100644 --- a/MC6809/src/mc6809.cpp +++ b/MC6809/src/mc6809.cpp @@ -18,13 +18,13 @@ int EightBit::mc6809::step() { if (LIKELY(powered())) { m_prefix10 = m_prefix11 = false; ExecutingInstruction.fire(*this); - if (lowered(RESET())) + if (UNLIKELY(lowered(RESET()))) handleRESET(); - else if (lowered(NMI())) + else if (UNLIKELY(lowered(NMI()))) handleNMI(); - else if (lowered(FIRQ()) && !(CC() & FF)) + else if (UNLIKELY(lowered(FIRQ()) && !(CC() & FF))) handleFIRQ(); - else if (lowered(IRQ()) && !(CC() & IF)) + else if (UNLIKELY(lowered(IRQ()) && !(CC() & IF))) handleIRQ(); else execute(fetchByte()); @@ -71,9 +71,9 @@ void EightBit::mc6809::handleFIRQ() { // int EightBit::mc6809::execute(uint8_t opcode) { - if (m_prefix10) + if (UNLIKELY(m_prefix10)) execute10(opcode); - else if (m_prefix11) + else if (UNLIKELY(m_prefix11)) execute11(opcode); else executeUnprefixed(opcode);