Correct a couple of LIKELY/UNLIKELY usages.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2017-12-02 10:34:37 +00:00
parent c2de6a2659
commit 9cbf76daf2

View File

@ -1203,7 +1203,7 @@ void EightBit::Z80::executeOther(const int x, const int y, const int z, const in
addCycles(7); addCycles(7);
break; break;
} case 6: // 8-bit load immediate } case 6: // 8-bit load immediate
if (LIKELY(m_displaced && (y == 6))) if (UNLIKELY(m_displaced && (y == 6)))
fetchDisplacement(); fetchDisplacement();
R(y, a, fetchByte()); // LD r,n R(y, a, fetchByte()); // LD r,n
addCycles(7); addCycles(7);
@ -1246,12 +1246,12 @@ void EightBit::Z80::executeOther(const int x, const int y, const int z, const in
} }
break; break;
case 1: // 8-bit loading case 1: // 8-bit loading
if (LIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL)) if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL))
halt(); halt();
} else { } else {
bool normal = true; bool normal = true;
if (LIKELY(m_displaced)) { if (UNLIKELY(m_displaced)) {
if (z == 6) { if (UNLIKELY(z == 6)) {
fetchDisplacement(); fetchDisplacement();
switch (y) { switch (y) {
case 4: case 4:
@ -1286,7 +1286,7 @@ void EightBit::Z80::executeOther(const int x, const int y, const int z, const in
addCycles(4); addCycles(4);
break; break;
case 2: // Operate on accumulator and register/memory location case 2: // Operate on accumulator and register/memory location
if (LIKELY(m_displaced && (z == 6))) if (UNLIKELY(m_displaced && (z == 6)))
fetchDisplacement(); fetchDisplacement();
switch (y) { switch (y) {
case 0: // ADD A,r case 0: // ADD A,r
@ -1372,7 +1372,7 @@ void EightBit::Z80::executeOther(const int x, const int y, const int z, const in
break; break;
case 1: // CB prefix case 1: // CB prefix
m_prefixCB = true; m_prefixCB = true;
if (LIKELY(m_displaced)) if (UNLIKELY(m_displaced))
fetchDisplacement(); fetchDisplacement();
fetchExecute(); fetchExecute();
break; break;