]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
jit_function_compile: clear block addresses and fixup lists if we need
authorRhys Weatherley <rweather@southern-storm.com.au>
Tue, 2 Nov 2004 06:18:07 +0000 (06:18 +0000)
committerRhys Weatherley <rweather@southern-storm.com.au>
Tue, 2 Nov 2004 06:18:07 +0000 (06:18 +0000)
to restart on a new cache page (minor alterations by Rhys).

ChangeLog
jit/jit-function.c

index 8b4cad31c1c6ef1f32f54b6f337597978dd04f1e..b56df3e2c3c7b4462f6bc47c8215320142a5e8d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
 
+2004-11-02  Evin Robertson  <evin@users.sourceforge.net>
+
+       * 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  <rweather@southern-storm.com.au>
 
        * jit/jit-rules-x86.sel: handle the special case of constant
index dc1ab4c37ef0f57fa7b0418dd06c7863dafe0317..8d19d26bbddaa2475067ecb76d92b2775dbdd181 100644 (file)
@@ -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);