@@ -277,6 +277,8 @@ const unsigned int MVM_jit_num_globals(void) {
277
277
| callp &MVM_exception_throw_adhoc;
278
278
|.endmacro
279
279
280
+ |.define FRAME_NR, dword [rbp+0x20]
281
+
280
282
/* A function prologue is always the same in x86 / x64, because
281
283
* we do not provide variable arguments, instead arguments are provided
282
284
* via a frame. All JIT entry points receive a prologue. */
@@ -300,7 +302,7 @@ void MVM_jit_emit_prologue(MVMThreadContext *tc, MVMJitGraph *jg,
300
302
| mov [rbp-0x18], WORK;
301
303
/* store the current frame number for cheap comparisons */
302
304
| mov TMP6d, dword TC:ARG1->current_frame_nr;
303
- | mov dword [rbp-0x20] , TMP6d;
305
+ | mov FRAME_NR , TMP6d;
304
306
/* setup special frame variables */
305
307
| mov TC, ARG1;
306
308
| mov CU, ARG2;
@@ -2407,7 +2409,7 @@ void MVM_jit_emit_control(MVMThreadContext *tc, MVMJitGraph *jg,
2407
2409
/* This relies on the fact that MVM_JIT_THROWISH_PRE has already
2408
2410
* assigned the jit entry label */
2409
2411
| mov eax, dword TC->current_frame_nr;
2410
- | cmp eax, dword [rbp-0x20] ;
2412
+ | cmp eax, FRAME_NR ;
2411
2413
| je >9;
2412
2414
| mov RV, 1;
2413
2415
| jmp ->out;
@@ -2434,7 +2436,7 @@ void MVM_jit_emit_control(MVMThreadContext *tc, MVMJitGraph *jg,
2434
2436
else if (ctrl->type == MVM_JIT_CONTROL_THROWISH_POST) {
2435
2437
/* check if our current frame is the same as it was */
2436
2438
| mov TMP1d, dword TC->current_frame_nr;
2437
- | cmp TMP1d, dword [rbp-0x20] ;
2439
+ | cmp TMP1d, FRAME_NR ;
2438
2440
| jne >8;
2439
2441
/* if it is, we may still be in a goto-handler, so in that
2440
2442
* case the throwing machinery should have ensured that
0 commit comments