mirror of https://github.com/mgba-emu/mgba.git
ARM: Run tighter loop in CPU
This commit is contained in:
parent
888b64f8b5
commit
845d6e1d24
|
@ -290,10 +290,12 @@ void ARMRun(struct ARMCore* cpu) {
|
|||
}
|
||||
|
||||
void ARMRunLoop(struct ARMCore* cpu) {
|
||||
while (cpu->cycles < cpu->nextEvent) {
|
||||
if (cpu->executionMode == MODE_THUMB) {
|
||||
if (cpu->executionMode == MODE_THUMB) {
|
||||
while (cpu->cycles < cpu->nextEvent) {
|
||||
ThumbStep(cpu);
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
while (cpu->cycles < cpu->nextEvent) {
|
||||
ARMStep(cpu);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ static inline void _ARMSetMode(struct ARMCore* cpu, enum ExecutionMode execution
|
|||
case MODE_THUMB:
|
||||
cpu->cpsr.t = 1;
|
||||
}
|
||||
cpu->nextEvent = 0;
|
||||
}
|
||||
|
||||
static inline void _ARMReadCPSR(struct ARMCore* cpu) {
|
||||
|
|
Loading…
Reference in New Issue