mirror of https://github.com/mgba-emu/mgba.git
ARM: multiply wait macros should write to local variable instead of global cycle count
This commit is contained in:
parent
3c41bd2427
commit
9e400e86da
|
@ -31,13 +31,13 @@
|
||||||
|
|
||||||
#define ARM_WAIT_MUL(R) \
|
#define ARM_WAIT_MUL(R) \
|
||||||
if ((R & 0xFFFFFF00) == 0xFFFFFF00 || !(R & 0xFFFFFF00)) { \
|
if ((R & 0xFFFFFF00) == 0xFFFFFF00 || !(R & 0xFFFFFF00)) { \
|
||||||
cpu->cycles += 1; \
|
currentCycles += 1; \
|
||||||
} else if ((R & 0xFFFF0000) == 0xFFFF0000 || !(R & 0xFFFF0000)) { \
|
} else if ((R & 0xFFFF0000) == 0xFFFF0000 || !(R & 0xFFFF0000)) { \
|
||||||
cpu->cycles += 2; \
|
currentCycles += 2; \
|
||||||
} else if ((R & 0xFF000000) == 0xFF000000 || !(R & 0xFF000000)) { \
|
} else if ((R & 0xFF000000) == 0xFF000000 || !(R & 0xFF000000)) { \
|
||||||
cpu->cycles += 3; \
|
currentCycles += 3; \
|
||||||
} else { \
|
} else { \
|
||||||
cpu->cycles += 4; \
|
currentCycles += 4; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ARM_STUB cpu->irqh.hitStub(cpu, opcode)
|
#define ARM_STUB cpu->irqh.hitStub(cpu, opcode)
|
||||||
|
|
Loading…
Reference in New Issue