From 42f74b5982c6d9d435c303ba59a1f847be65cb12 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 17 Nov 2012 10:01:22 -0700 Subject: [PATCH] JIT tweak: stack-clearing operations do not disturb registers --- src/racket/src/jitstate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/racket/src/jitstate.c b/src/racket/src/jitstate.c index a67bc4530d..3d6f272af9 100644 --- a/src/racket/src/jitstate.c +++ b/src/racket/src/jitstate.c @@ -762,11 +762,17 @@ int scheme_stack_safety(mz_jit_state *jitter, int cnt, int offset) that we make, so that whatever happens to be there isn't traversed in case of a GC. the value of JIT_RUNSTACK is handy to use as a "clear" value. */ - int i; + int i, valid; + + valid = mz_CURRENT_REG_STATUS_VALID(); + for (i = 0; i < cnt; i++) { mz_rs_stxi(i+offset, JIT_RUNSTACK); CHECK_LIMIT(); } + + if (valid) mz_SET_REG_STATUS_VALID(1); + return 1; }