Skip to content

Commit ce929fd

Browse files
committed
Rearrange end_instruction
1 parent ac46116 commit ce929fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cpu/worker.mlog.jinja

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ end_instruction:
239239
op sub accumulator accumulator 3
240240

241241
end_instruction_trap:
242+
# check this first to aid in debugging
243+
jump ipt_overrun notEqual current_tick @tick
244+
242245
# next_pc is set to pc + 4 at the start of main
243246
# if we're in the icache, icache_var was already incremented
244247
# if next_pc was modified, icache_var should have also been set to null
@@ -247,7 +250,6 @@ end_instruction_trap:
247250
jump state->pause equal pc breakpoint_address
248251
jump state->pause equal single_step_enabled true
249252

250-
jump ipt_overrun notEqual current_tick @tick
251253
jump next_tick lessThanEq accumulator {{MAX_INSTRUCTION_COST}}
252254
jump main notEqual interrupts_pending true
253255
jump check_interrupts always

0 commit comments

Comments
 (0)