1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-04 22:40:25 +02:00

Allow jit_jmpi on an immediate constant address.

* lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
	lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c,
	lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
	lib/jit_x86.c, lib/lightning.c: Allow jit_jmpi on a
	target that is not a node. This may lead to hard to
	debug code generation, but is a required feature for
	certain generators, like the ones that used lightning
	1.2x. Note that previously, but not really well
	documented, it was instructed to use:
	jit_movi(rn, addr); jit_jmpr(rn);
	but now, plain:
	jit_patch_abs(jit_jmpi(), addr);
	should also work.
This commit is contained in:
pcpa 2014-10-14 17:04:13 -03:00
parent 1d75fe625a
commit 20a2f1f9c5
12 changed files with 144 additions and 87 deletions

View file

@ -1343,15 +1343,19 @@ _emit_code(jit_state_t *_jit)
jmpr(rn(node->u.w));
break;
case jit_code_jmpi:
temp = node->u.n;
assert(temp->code == jit_code_label ||
temp->code == jit_code_epilog);
if (temp->flag & jit_flag_patch)
jmpi(temp->u.w);
else {
word = jmpi(_jit->pc.w);
patch(word, node);
if (node->flag & jit_flag_node) {
temp = node->u.n;
assert(temp->code == jit_code_label ||
temp->code == jit_code_epilog);
if (temp->flag & jit_flag_patch)
jmpi(temp->u.w);
else {
word = jmpi(_jit->pc.w);
patch(word, node);
}
}
else
jmpi(node->u.w);
break;
case jit_code_callr:
callr(rn(node->u.w));