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

Change type of return of jit_arg* and argument to jit_getarg*

* check/lightning.c, include/lightning.h, lib/jit_arm.c,
	lib/jit_mips.c, lib/jit_ppc.c, lib/jit_print.c,	lib/jit_x86.c,
	lib/lightning.c: Change return value of jit_arg{,_f,_d} to
	a jit_node_t* object, that should be used as argument to
	jit_getarg_{c,uc,s,us,i,ui,l,f,d}. This just requires changing
	from jit_int32_t to jit_pointer_t (or jit_node_t*) the "handle"
	for the getarg calls, with the benefit that it makes it easy
	to implement patching of the stack address of non register
	arguments, this way allowing to implement variable size stack
	frames if applicable; useful if there are too many registers and
	jit functions uses only a few callee save registers.
This commit is contained in:
pcpa 2012-12-28 10:35:14 -02:00
parent 1287a2d448
commit 2e6c680d70
9 changed files with 304 additions and 256 deletions

View file

@ -40,6 +40,7 @@ static char *code_name[] = {
"#note",
"label",
"prolog",
"arg",
"addr", "addi",
"addcr", "addci",
"addxr", "addxi",
@ -118,7 +119,7 @@ static char *code_name[] = {
"jmpr", "jmpi",
"callr", "calli",
"epilog",
"getarg_f",
"arg_f", "getarg_f",
"addr_f", "addi_f",
"subr_f", "subi_f",
"mulr_f", "muli_f",
@ -162,7 +163,7 @@ static char *code_name[] = {
"bunordr_f", "bunordi_f",
"pushargr_f", "pushargi_f",
"retval_f",
"getarg_d",
"arg_d", "getarg_d",
"addr_d", "addi_d",
"subr_d", "subi_d",
"mulr_d", "muli_d",
@ -258,6 +259,8 @@ _jit_print(jit_state_t *_jit)
switch (node->code) {
r:
print_chr(' '); print_reg(node->u.w); continue;
w:
print_chr(' '); print_hex(node->u.w); continue;
n:
print_chr(' ');
if (!(node->flag & jit_flag_node))
@ -391,6 +394,8 @@ _jit_print(jit_state_t *_jit)
case jit_cc_a0_reg|jit_cc_a0_chg:
case jit_cc_a0_reg|jit_cc_a0_jmp:
goto r;
case jit_cc_a0_int:
goto w;
case jit_cc_a0_jmp:
goto n;
case jit_cc_a0_reg|jit_cc_a1_reg: