fix JIT bug exposed by OpenBSD 5.0
This is the second attempt to fix a problem with using a JIT-generated address in JIT-generated code. Closes PR 12627
This commit is contained in:
parent
8f0cf5ba9e
commit
420d3e7717
|
@ -2606,7 +2606,8 @@ static int common10(mz_jit_state *jitter, void *_data)
|
||||||
jit_ldxi_i(JIT_R2, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->closure_size);
|
jit_ldxi_i(JIT_R2, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->closure_size);
|
||||||
(void)jit_blti_i(refslow, JIT_R2, 0); /* case lambda */
|
(void)jit_blti_i(refslow, JIT_R2, 0); /* case lambda */
|
||||||
jit_ldxi_p(JIT_R2, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->start_code);
|
jit_ldxi_p(JIT_R2, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->start_code);
|
||||||
jit_movi_p(JIT_V1, scheme_on_demand_jit_code); /* movi_p doesn't depend on actual address, which might change size */
|
/* patchable_movi_p doesn't depend on actual address, which might change size: */
|
||||||
|
(void)jit_patchable_movi_p(JIT_V1, scheme_on_demand_jit_code);
|
||||||
ref_nc = jit_beqr_p(jit_forward(), JIT_R2, JIT_V1); /* not yet JITted? */
|
ref_nc = jit_beqr_p(jit_forward(), JIT_R2, JIT_V1); /* not yet JITted? */
|
||||||
jit_rshi_l(JIT_V1, JIT_R1, 1);
|
jit_rshi_l(JIT_V1, JIT_R1, 1);
|
||||||
jit_addi_l(JIT_V1, JIT_V1, 1);
|
jit_addi_l(JIT_V1, JIT_V1, 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user