From 8d9614c41cdb0ee99d6c3768e8539f6fcd7adca3 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 8 Jan 2012 13:18:19 -0700 Subject: [PATCH] better JIT repair I'm fairly certain that the change in commit 25e9bd2a190acf861 isn't right, but I'm having trouble generating tests to demonstrate the original bug or this correction. --- src/racket/src/jitarith.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/jitarith.c b/src/racket/src/jitarith.c index 3cf5772bf3..12bda60dea 100644 --- a/src/racket/src/jitarith.c +++ b/src/racket/src/jitarith.c @@ -952,7 +952,8 @@ int scheme_generate_arith(mz_jit_state *jitter, Scheme_Object *rator, Scheme_Obj jitter->unbox_depth -= flonum_depth; if (!jitter->unbox && jitter->unbox_depth && rand) scheme_signal_error("internal error: broken unbox depth"); - if (for_branch) + if (for_branch + || (arith == ARITH_INEX_EX)) /* has slow path */ mz_rs_sync(); /* needed if arguments were unboxed */ generate_double_arith(jitter, rator, arith, cmp, reversed, !!rand2, 0, @@ -966,7 +967,6 @@ int scheme_generate_arith(mz_jit_state *jitter, Scheme_Object *rator, Scheme_Obj if ((arith == ARITH_INEX_EX) && (unsafe_fl < 1)) { /* need a slow path */ - mz_rs_sync(); /* needed if arguments were unboxed */ if (args_unboxed) { (void)jit_calli(sjc.box_flonum_from_reg_code); }