Add a couple of LIKELY/UNLIKELY specifications to the 6809 processor.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-08-25 12:51:43 +01:00
parent c105ee37bf
commit ae66b39dac

View File

@ -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);