1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-21 19:20:21 +02:00

Add better ppc support code, but still not functional.

* configure.ac: Only default to using the builtin disassembler
	if on GNU/Linux. This should be temporary, due to requiring
	/proc/self/exe.
	  Correctly check $target_cpu for powerpc.

	* include/lightning/jit_ppc.h: Correctly implement jit_v_num.

	* include/lightning/jit_private.h: Declare proper prototype
	for jit_init_debug and jit_finish_debug.

	* lib/jit_ppc-cpu.c: Remove code to save/restore callee save
	float registers, as it is not required since those float
	registers are not usable currently.
	  Change prolog and epilog generation to, at least comparing
	code, match what gcc generates in "gcc -O0", but it is still
	failing in Darwin PPC, apparently due to the __clear_cache
	call not being enough, as frequently it will also fail to
	execute, and the code buffer is all zeroes.

	* lib/lightning.c: Do not fail in jit_regset_scan1 calls due
	to passing 64 as argument on computers with 64 registers.
This commit is contained in:
pcpa 2012-12-11 02:16:51 -02:00
parent a3fbc5da96
commit 7e3d863767
6 changed files with 55 additions and 36 deletions

View file

@ -1221,8 +1221,10 @@ _jit_setup(jit_state_t *_jit, jit_block_t *block)
jit_regset_setbit(reglive, node->u.w);
}
case jit_code_calli:
for (value = jit_regset_scan1(regmask, 0); value != ULONG_MAX;
value = jit_regset_scan1(regmask, value + 1)) {
for (value = 0; value < _jit->reglen; ++value) {
value = jit_regset_scan1(regmask, value);
if (value >= _jit->reglen)
break;
spec = jit_class(_rvs[value].spec);
if (!(spec & jit_class_sav))
jit_regset_clrbit(regmask, value);
@ -1349,8 +1351,10 @@ _jit_update(jit_state_t *_jit, jit_bool_t setup, jit_node_t *node,
jit_regset_clrbit(*mask, JIT_FRET);
}
#endif
for (value = jit_regset_scan1(*mask, 0); value != ULONG_MAX;
value = jit_regset_scan1(*mask, value + 1)) {
for (value = 0; value < _jit->reglen; ++value) {
value = jit_regset_scan1(*mask, value);
if (value >= _jit->reglen)
break;
spec = jit_class(_rvs[value].spec);
if (!(spec & jit_class_sav))
jit_regset_clrbit(*mask, value);