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

Correct implementation problems on ix86.

* check/all.tst, check/lightning.c: Only declare or use 64 bit
	interfaces on 64 bit builds.

	* check/fib.tst: Use simpler logic to not need preprocessor
	conditionals for 32 or 64 bit.

	* include/lightning.h: Only declare 64 bit macros on a 64 bit
	build. Code using lightning must know about wordsize and the
	jit generation limitations, also, this way it generates a
	compile time failure, not a runtime assertion.

	* include/lightning/jit_x86.h: Correct typo in macro name.

	* lib/jit_arm.c, lib/jit_arm-cpu.c, lib/jit_mips.c,
	lib/jit_mips-cpu.c, lib/jit_ppc.c, lib/jit_ppc-cpu.c,
	lib/jit_x86.c, lib/jit_x86-cpu.c: Correct wrong code to get
	current jit function pointer.

	* lib/lightning.c: Move call to the simplify() optimization
	to after register liveness is known. Previous code did work
	by accident but now with proper test cases the problem was
	noticed.

	* lib/jit_disasm.c: Always cast bfd_vma to long long when
	passing it as printf argument.
This commit is contained in:
pcpa 2012-12-03 09:40:08 -02:00
parent e6f1df7124
commit 712877a5a4
16 changed files with 229 additions and 182 deletions

View file

@ -1092,7 +1092,7 @@ _jit_emit(jit_state_t *_jit)
calli(node->u.w);
break;
case jit_code_prolog:
_jit->function = _jit->functions.ptr[node->u.w];
_jit->function = _jit->functions.ptr + node->w.w;
undo.node = node;
undo.word = _jit->pc.w;
undo.patch_offset = _jit->patches.offset;
@ -1101,6 +1101,7 @@ _jit_emit(jit_state_t *_jit)
prolog(node);
break;
case jit_code_epilog:
assert(_jit->function == _jit->functions.ptr + node->w.w);
if (_jit->again) {
for (temp = undo.node->next;
temp != node; temp = temp->next) {