]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
Flush the constant pool after unconditional branches, to try to
authorRhys Weatherley <rweather@southern-storm.com.au>
Thu, 10 Jun 2004 00:07:36 +0000 (00:07 +0000)
committerRhys Weatherley <rweather@southern-storm.com.au>
Thu, 10 Jun 2004 00:07:36 +0000 (00:07 +0000)
minimize the probability that the pool will be flushed in the
middle of a loop body.

ChangeLog
jit/jit-rules-arm.sel

index b510fb38576c41c083741be817a5db530cd896e2..525133d6390b41d63246448a2b51f41ee41951f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        tools/gen-sel-parser.y: redesign the ARM code generation macros
        so that they have stronger protection against buffer overruns.
 
+       * jit/jit-rules-arm.sel: flush the constant pool after unconditional
+       branches, to try to minimize the probability that the pool will
+       be flushed in the middle of a loop body.
+
 2004-06-08  Rhys Weatherley  <rweather@southern-storm.com.au>
 
        * jit/Makefile.am, jit/jit-cpuid-x86.c, jit/jit-cpuid-x86.h:
index 7c1b6f513ba81aaf25a4794d0adc2c2f4ea351eb..adf80c678cb68a1444f22577aab16d9f29df8beb 100644 (file)
@@ -268,6 +268,12 @@ JIT_OP_BR: spill_before
        [] -> {
                /* ARM_CC_AL == "always branch" */
                output_branch(func, &inst, ARM_CC_AL, insn);
+
+               /* Flush the constant pool now, to minimize the probability that
+                  it is accidentally flushed in the middle of a loop body */
+               jit_gen_save_inst_ptr(gen, inst);
+               flush_constants(gen, 1);
+               jit_gen_load_inst_ptr(gen, inst);
        }
 
 JIT_OP_BR_IFALSE: unary_branch