mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-04 22:40:25 +02:00
mips: Add initial jit_va_ calls to mips
* lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips.c: Add base support to jit vararg functions to the mips backend. Currently only supported on the o32 abi, until access to a n32 system is arranged.
This commit is contained in:
parent
b42bb8b7a1
commit
a5ab4c7718
4 changed files with 112 additions and 0 deletions
|
@ -53,6 +53,13 @@
|
|||
# define I_DISP STACK_SLOT - sizeof(jit_int32_t)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
typedef struct jit_va_list {
|
||||
jit_pointer_t stack;
|
||||
} jit_va_list_t;
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
|
@ -326,6 +333,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1577,9 +1589,19 @@ _emit_code(jit_state_t *_jit)
|
|||
(jit_float64_t *)node->w.n->u.w);
|
||||
break;
|
||||
#endif
|
||||
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;
|
||||
default:
|
||||
abort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue