mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-08 22:50:27 +02:00
Add initial support to implement vararg jit functions
* include/lightning.h, include/lightning/jit_private.h, lib/jit_names.c, lib/lightning.c: Add initial support for the new jit_va_start, jit_va_arg, jit_va_arg_d, and jit_va_end interfaces. The jit_va_start call is supposed to return a va_list compatible pointer, but not yet decided if it will be "declared" stdarg compatible, as for now only x86 support has been added (and should be compatible), but issues may arise on other backends. * check/lightning.c: Add wrappers to call the new jit_va_* interfaces. * lib/jit_x86-cpu.c, lib/jit_x86.c: Implement the new jit_va_* for x86. * lib/jit_x86-sz.c: Add fields, but not yet fully updated, as this is an intermediate commit. * lib/jit_aarch64-sz.c, lib/jit_aarch64.c, lib/jit_alpha-sz.c, lib/jit_alpha.c, lib/jit_arm-sz.c, lib/jit_arm.c, lib/jit_hppa-sz.c, lib/jit_hppa.c, lib/jit_ia64-sz.c, lib/jit_ia64.c, lib/jit_mips-sz.c, lib/jit_mips.c, lib/jit_ppc-sz.c, lib/jit_ppc.c, lib/jit_s390-sz.c, lib/jit_s390.c, lib/jit_sparc-sz.c, lib/jit_sparc.c: Prepare for the new jit_va_* interfaces. Not yet implemented, and will cause an assertion if used. * check/va_list.tst: Simple early test case, that works on x86_64, x32, ix86, cygwin, and cygwin64.
This commit is contained in:
parent
a15f261afc
commit
d639674549
28 changed files with 639 additions and 29 deletions
|
@ -38,6 +38,14 @@
|
|||
# include <machine/endian.h>
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# if !defined(offsetof)
|
||||
# define offsetof(type, field) ((char *)&((type *)0)->field - (char *)0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __WORDSIZE
|
||||
# if defined(WORDSIZE) /* ppc darwin */
|
||||
# define __WORDSIZE WORDSIZE
|
||||
|
@ -854,7 +862,16 @@ typedef enum {
|
|||
#define jit_movi_d_w(u, v) jit_new_node_wd(jit_code_movi_d_w, u, v)
|
||||
|
||||
jit_code_x86_retval_f, jit_code_x86_retval_d,
|
||||
#define jit_code_last_code jit_code_x86_retval_d
|
||||
|
||||
/* These should be moved/reordered when bumping library major */
|
||||
jit_code_va_start,
|
||||
#define jit_va_start(u) jit_new_node_w(jit_code_va_start, u)
|
||||
jit_code_va_arg, jit_code_va_arg_d,
|
||||
#define jit_va_arg(u, v) jit_new_node_ww(jit_code_va_arg, u, v)
|
||||
#define jit_va_arg_d(u, v) jit_new_node_ww(jit_code_va_arg_d, u, v)
|
||||
jit_code_va_end,
|
||||
#define jit_va_end(u) jit_new_node_w(jit_code_va_end, u)
|
||||
#define jit_code_last_code jit_code_va_end
|
||||
} jit_code_t;
|
||||
|
||||
typedef void* (*jit_alloc_func_ptr) (size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue