1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-26 13:10:22 +02:00

ia64: Add initial jit_va_ calls to ia64

* lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c, lib/jit_ia64.c:
	Add base support to jit vararg functions to the ia64 backend.
This commit is contained in:
Paulo Andrade 2015-05-10 19:35:40 -03:00
parent a3063df782
commit 6d8f8eb604
4 changed files with 99 additions and 1 deletions

View file

@ -35,6 +35,13 @@
# define F_DISP 8 - sizeof(jit_float32_t)
#endif
/*
* Types
*/
typedef struct jit_va_list {
jit_pointer_t stack;
} jit_va_list_t;
/*
* Prototypes
*/
@ -402,6 +409,11 @@ _jit_ellipsis(jit_state_t *_jit)
else {
assert(!(_jitc->function->self.call & jit_call_varargs));
_jitc->function->self.call |= jit_call_varargs;
/* Allocate va_list like object in the stack. */
_jitc->function->vaoff = jit_allocai(sizeof(jit_va_list_t));
_jitc->function->vagp = _jitc->function->self.argi;
}
}
@ -1409,9 +1421,19 @@ _emit_code(jit_state_t *_jit)
_jitc->pred = 0;
_jitc->function = NULL;
break;
case jit_code_va_start:
vastart(rn(node->u.w));
break;
case jit_code_va_arg:
vaarg(rn(node->u.w), rn(node->v.w));
break;
case jit_code_va_arg_d:
vaarg_d(rn(node->u.w), rn(node->v.w));
break;
case jit_code_live:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
case jit_code_va_end:
break;
case jit_code_movr_f_w:
movr_f_w(rn(node->u.w), rn(node->v.w));