From a5bcbb7c6ae281e4789aaea3d721464bbff56167 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 10 Jun 2004 00:07:36 +0000 Subject: [PATCH] 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. --- ChangeLog | 4 ++++ jit/jit-rules-arm.sel | 6 ++++++ 2 files changed, 10 insertions(+) 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 -- 2.47.3