From f87b2f6df889abadfb21241d45998e6f1e21d7b4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 9 Oct 2008 10:19:26 +0200 Subject: [PATCH] subtract 1 from the final byte being flushed in PPC jit_flush_code 2008-10-09 Paolo Bonzini * lightning/ppc/funcs.h (jit_flush_code): Subtract 1 from end. Reported by Eli Barzilay and Matthew Flatt. --- ChangeLog | 5 +++++ lightning/ppc/funcs.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0d4e476a5..bda065e13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-09 Paolo Bonzini + + * lightning/ppc/funcs.h (jit_flush_code): Subtract 1 from end. + Reported by Eli Barzilay and Matthew Flatt. + 2008-08-23 Nix * lightning/i386/Makefile.frag: fp-32.h and fp-64.h are target files. diff --git a/lightning/ppc/funcs.h b/lightning/ppc/funcs.h index 9f3df907e..ae9301f93 100644 --- a/lightning/ppc/funcs.h +++ b/lightning/ppc/funcs.h @@ -67,6 +67,9 @@ jit_flush_code(void *start, void *end) break; } + /* Point end to the last byte being flushed. */ + end =(void*)( (long)(end - 1)); + start =(void*)( (long)start - (((long) start) & (cache_line_size - 1))); end =(void*)( (long)end - (((long) end) & (cache_line_size - 1)));