From d2ef35082a6bf097d426e5179470f815913c7266 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 15 Apr 2018 17:23:39 -0600 Subject: [PATCH] repair JIT-inlined `hash-ref` The attempt in 82517622c7 was wrong. Using `JIT_R0` for the result in the internal ABI is fine, and the problem was using a register for two purposes in the called stub. --- racket/src/racket/src/jitcommon.c | 2 +- racket/src/racket/src/jitinline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/racket/src/racket/src/jitcommon.c b/racket/src/racket/src/jitcommon.c index 8eda1235c5..4baf83950a 100644 --- a/racket/src/racket/src/jitcommon.c +++ b/racket/src/racket/src/jitcommon.c @@ -4104,7 +4104,7 @@ static int more_common1(mz_jit_state *jitter, void *_data) sjc.hash_ref_code = jit_get_ip(); - mz_prolog(JIT_R2); + mz_prolog(JIT_V1); jit_subi_p(JIT_RUNSTACK, JIT_RUNSTACK, WORDS_TO_BYTES(3)); CHECK_RUNSTACK_OVERFLOW(); jit_str_p(JIT_RUNSTACK, JIT_R0); diff --git a/racket/src/racket/src/jitinline.c b/racket/src/racket/src/jitinline.c index 7d68b2f3ee..5e1e4f6b5b 100644 --- a/racket/src/racket/src/jitinline.c +++ b/racket/src/racket/src/jitinline.c @@ -5586,7 +5586,7 @@ int scheme_generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int scheme_mz_load_retained(jitter, JIT_R2, app->args[3]); (void)jit_calli(sjc.hash_ref_code); - jit_retval(dest); + jit_movr_p(dest, JIT_R0); CHECK_LIMIT(); __START_SHORT_JUMPS__(1);