Skip to content

Commit 9279023

Browse files
committed
perf: Optimize NEXT_INST macro by reordering memory loads for better performance
1 parent 0067ebd commit 9279023

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/machine/asm/execute_x64.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,11 @@
373373
*/
374374
#define NEXT_INST \
375375
movq (INST_ARGS), %rcx; \
376+
movq (INST_PC), TEMP1; \
376377
addq $8, INST_ARGS; \
378+
addq $8, INST_PC; \
377379
movzbl %ch, RDd_RS2sd; \
378380
sar $32, %rcx; \
379-
movq (INST_PC), TEMP1; \
380-
addq $8, INST_PC; \
381381
jmp *TEMP1
382382

383383
#define NEXT_INST_V2 \

0 commit comments

Comments
 (0)