diff --git a/ChangeLog b/ChangeLog index 0eda2172c..b3485b1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-07-02 Laurent Michel + + * lightning/ppc/funcs.h (jit_flush_code): modified the computation + of start/end. The pointer arithmetic was done without casting. It + prevented compilation with recent gcc versions. + * lightning/ppc/core.h (jit_pushr_i): The offset for the store was + incorrect. Should have been 4 bytes below SP (not above). + * lightning/ppc/core.h (jit_popr_i): The offset for the load was + incorrect. Should have been 0 (not +8). + 2008-06-17 Paolo Bonzini * lightning/i386/asm-64.h: Forward IMULQir to IMULQirr, diff --git a/lightning/ppc/core.h b/lightning/ppc/core.h index c26566d64..6772e4ff1 100644 --- a/lightning/ppc/core.h +++ b/lightning/ppc/core.h @@ -259,8 +259,8 @@ struct jit_local_state { #define jit_orr_i(d, s1, s2) ORrrr((d), (s1), (s2)) #ifdef JIT_NEED_PUSH_POP -#define jit_popr_i(rs) (LWZrm((rs), 8, 1), ADDIrri(1, 1, 4)) -#define jit_pushr_i(rs) (STWrm((rs), 4, 1), ADDIrri (1, 1, -4)) +#define jit_popr_i(rs) (LWZrm((rs), 0, 1), ADDIrri(1, 1, 4)) +#define jit_pushr_i(rs) (STWrm((rs), -4, 1), ADDIrri (1, 1, -4)) #endif #define jit_prepare_i(numi) (_jitl.nextarg_puti = numi) diff --git a/lightning/ppc/funcs.h b/lightning/ppc/funcs.h index 131687bd2..9f3df907e 100644 --- a/lightning/ppc/funcs.h +++ b/lightning/ppc/funcs.h @@ -67,8 +67,8 @@ jit_flush_code(void *start, void *end) break; } - start -= ((long) start) & (cache_line_size - 1); - end -= ((long) end) & (cache_line_size - 1); + start =(void*)( (long)start - (((long) start) & (cache_line_size - 1))); + end =(void*)( (long)end - (((long) end) & (cache_line_size - 1))); /* Force data cache write-backs */ for (ddest = (char *) start; ddest <= (char *) end; ddest += cache_line_size) {