mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-26 05:00:28 +02:00
sparc: Add initial jit_va_ calls to sparc
* lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c, lib/jit_sparc.c: Add base support to jit vararg functions to the sparc backend.
This commit is contained in:
parent
9a90a28360
commit
bd38cfa9c9
4 changed files with 64 additions and 0 deletions
|
@ -22,6 +22,11 @@
|
|||
#define jit_arg_reg_p(i) ((i) >= 0 && (i) < 6)
|
||||
#define jit_arg_d_reg_p(i) ((i) >= 0 && (i) < 5)
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
typedef jit_pointer_t jit_va_list_t;
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
|
@ -268,6 +273,8 @@ _jit_ellipsis(jit_state_t *_jit)
|
|||
else {
|
||||
assert(!(_jitc->function->self.call & jit_call_varargs));
|
||||
_jitc->function->self.call |= jit_call_varargs;
|
||||
|
||||
_jitc->function->vagp = _jitc->function->self.argi;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1274,9 +1281,19 @@ _emit_code(jit_state_t *_jit)
|
|||
epilog(node);
|
||||
_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;
|
||||
default:
|
||||
abort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue