1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-27 23:40:24 +02:00

fix miscellaneous PPC-32 back-end bugs

2008-07-02  Laurent Michel  <ldm@engr.uconn.edu>

	* 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).
This commit is contained in:
Laurent Michel 2008-07-10 16:09:05 +02:00 committed by Paolo Bonzini
parent 66c8a682af
commit b3817a102e
3 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,13 @@
2008-07-02 Laurent Michel <ldm@engr.uconn.edu>
* 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 <bonzini@gnu.org>
* lightning/i386/asm-64.h: Forward IMULQir to IMULQirr,

View file

@ -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)

View file

@ -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) {