From: Rhys Weatherley Date: Tue, 2 Nov 2004 06:18:07 +0000 (+0000) Subject: jit_function_compile: clear block addresses and fixup lists if we need X-Git-Tag: r.0.0.6~28 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=11b114c1bbcd124b05f380cfa745b50986a8de1e;p=francis%2Flibjit.git jit_function_compile: clear block addresses and fixup lists if we need to restart on a new cache page (minor alterations by Rhys). --- diff --git a/ChangeLog b/ChangeLog index 8b4cad3..b56df3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ +2004-11-02 Evin Robertson + + * jit/jit-function.c (jit_function_compile): clear block addresses + and fixup lists if we need to restart on a new cache page (minor + alterations by Rhys). + 2004-10-31 Rhys Weatherley * jit/jit-rules-x86.sel: handle the special case of constant diff --git a/jit/jit-function.c b/jit/jit-function.c index dc1ab4c..8d19d26 100644 --- a/jit/jit-function.c +++ b/jit/jit-function.c @@ -700,6 +700,19 @@ int jit_function_compile(jit_function_t func) /* End the function's output process */ result = _jit_cache_end_method(&(gen.posn)); + + /* If we need to restart on a different cache page, then clear + the block addresses and fixup lists */ + if(result == JIT_CACHE_END_RESTART) + { + block = 0; + while((block = jit_block_next(func, block)) != 0) + { + block->address = 0; + block->fixup_list = 0; + } + } + } while(result == JIT_CACHE_END_RESTART);