From: Rhys Weatherley Date: Thu, 10 Jun 2004 00:07:36 +0000 (+0000) Subject: Flush the constant pool after unconditional branches, to try to X-Git-Tag: r.0.0.4~24 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=a5bcbb7c6ae281e4789aaea3d721464bbff56167;p=francis%2Flibjit.git 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. --- diff --git a/ChangeLog b/ChangeLog index b510fb3..525133d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,10 @@ 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 * jit/Makefile.am, jit/jit-cpuid-x86.c, jit/jit-cpuid-x86.h: diff --git a/jit/jit-rules-arm.sel b/jit/jit-rules-arm.sel index 7c1b6f5..adf80c6 100644 --- a/jit/jit-rules-arm.sel +++ b/jit/jit-rules-arm.sel @@ -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