[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 415/437: Build and pass all test cases on Alpha Linux
From: |
Andy Wingo |
Subject: |
[Guile-commits] 415/437: Build and pass all test cases on Alpha Linux |
Date: |
Mon, 2 Jul 2018 05:15:06 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit ed5589ce59844c7ab26408441a107904ebabe382
Author: Paulo Andrade <address@hidden>
Date: Mon Feb 26 09:48:50 2018 -0300
Build and pass all test cases on Alpha Linux
* check/lightning.c, include/lightning.h: Add the new jit_va_push
interface. That should be called when passing a va_list to a C
function. This is required because on Alpha a va_list is passed
by value, and lightning does not know about data types, so, cannot
understand it is pushing a va_list as argument.
* lib/jit_names.c, lib/lightning.c: Minor changes for the new
jit_code_va_push.
* check/cva_list.c: Update only test case using jit_va_push, to
pass a va_list to a C function.
doc/body.texi: Better documentation of the varargs interface.
* jit_alpha.c, jit_alpha-cpu.c: Update to properly push a
C va_list and correctly calculate varargs offset.
* lib/jit_aarch64-sz.c, lib/jit_aarch64.c, lib/jit_alpha-sz.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, lib/jit_x86-sz.c, lib/jit_x86.c:
Update for the new jit_va_push interface.
---
ChangeLog | 26 ++++++++++++++++++++++++++
check/cva_list.c | 32 ++++++++++++++++----------------
check/lightning.c | 9 ++++++++-
doc/body.texi | 10 ++++++++++
include/lightning.h | 3 +++
lib/jit_aarch64-sz.c | 1 +
lib/jit_aarch64.c | 9 +++++++++
lib/jit_alpha-cpu.c | 5 ++++-
lib/jit_alpha-sz.c | 1 +
lib/jit_alpha.c | 15 +++++++++++++++
lib/jit_arm-sz.c | 2 ++
lib/jit_arm.c | 9 +++++++++
lib/jit_hppa-sz.c | 1 +
lib/jit_hppa.c | 9 +++++++++
lib/jit_ia64-sz.c | 1 +
lib/jit_ia64.c | 9 +++++++++
lib/jit_mips-sz.c | 3 +++
lib/jit_mips.c | 9 +++++++++
lib/jit_names.c | 2 +-
lib/jit_ppc-sz.c | 4 ++++
lib/jit_ppc.c | 9 +++++++++
lib/jit_s390-sz.c | 2 ++
lib/jit_s390.c | 9 +++++++++
lib/jit_sparc-sz.c | 1 +
lib/jit_sparc.c | 9 +++++++++
lib/jit_x86-sz.c | 4 ++++
lib/jit_x86.c | 9 +++++++++
lib/lightning.c | 4 ++--
28 files changed, 186 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 660f018..3ace35a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2018-02-26 Paulo Andrade <address@hidden>
+
+ * check/lightning.c, include/lightning.h: Add the new jit_va_push
+ interface. That should be called when passing a va_list to a C
+ function. This is required because on Alpha a va_list is passed
+ by value, and lightning does not know about data types, so, cannot
+ understand it is pushing a va_list as argument.
+
+ * lib/jit_names.c, lib/lightning.c: Minor changes for the new
+ jit_code_va_push.
+
+ * check/cva_list.c: Update only test case using jit_va_push, to
+ pass a va_list to a C function.
+
+ doc/body.texi: Better documentation of the varargs interface.
+
+ * jit_alpha.c, jit_alpha-cpu.c: Update to properly push a
+ C va_list and correctly calculate varargs offset.
+
+ * lib/jit_aarch64-sz.c, lib/jit_aarch64.c, lib/jit_alpha-sz.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, lib/jit_x86-sz.c, lib/jit_x86.c:
+ Update for the new jit_va_push interface.
+
2018-02-22 Paulo Andrade <address@hidden>
* lib/jit_alpha-cpu.c: Always set t12 to the address of the
diff --git a/check/cva_list.c b/check/cva_list.c
index 350d796..b0e668c 100644
--- a/check/cva_list.c
+++ b/check/cva_list.c
@@ -586,7 +586,7 @@ int main(int argc, char *argv[])
jit_va_start(JIT_V0);
jit_prepare();
jit_pushargr(JIT_V1);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_i_iiiiiiiii);
jit_va_end(JIT_V0);
jit_ret();
@@ -603,7 +603,7 @@ int main(int argc, char *argv[])
jit_prepare();
jit_pushargr(JIT_V1);
jit_pushargr(JIT_V2);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_ii_iiiiiiii);
jit_va_end(JIT_V0);
jit_ret();
@@ -617,7 +617,7 @@ int main(int argc, char *argv[])
jit_va_start(JIT_V0);
jit_prepare();
jit_pushargr_d(JIT_F3);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_d_ddddddddd);
jit_va_end(JIT_V0);
jit_ret();
@@ -634,7 +634,7 @@ int main(int argc, char *argv[])
jit_prepare();
jit_pushargr_d(JIT_F3);
jit_pushargr_d(JIT_F4);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_dd_dddddddd);
jit_va_end(JIT_V0);
jit_ret();
@@ -648,7 +648,7 @@ int main(int argc, char *argv[])
jit_va_start(JIT_V0);
jit_prepare();
jit_pushargr(JIT_V1);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_i_didididid);
jit_va_end(JIT_V0);
jit_ret();
@@ -665,7 +665,7 @@ int main(int argc, char *argv[])
jit_prepare();
jit_pushargr(JIT_V1);
jit_pushargr_d(JIT_F3);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_id_idididid);
jit_va_end(JIT_V0);
jit_ret();
@@ -679,7 +679,7 @@ int main(int argc, char *argv[])
jit_va_start(JIT_V0);
jit_prepare();
jit_pushargr_d(JIT_F3);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_d_ididididi);
jit_va_end(JIT_V0);
jit_ret();
@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
jit_prepare();
jit_pushargr_d(JIT_F3);
jit_pushargr(JIT_V1);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_di_didididi);
jit_va_end(JIT_V0);
jit_ret();
@@ -723,7 +723,7 @@ int main(int argc, char *argv[])
jit_pushargi(1);
jit_pushargr(JIT_V1);
jit_pushargr(JIT_V2);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_iii_iiiiiii);
jit_va_end(JIT_V0);
jit_ret();
@@ -750,7 +750,7 @@ int main(int argc, char *argv[])
jit_pushargi(2);
jit_pushargr(JIT_V1);
jit_pushargr(JIT_V2);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_iiii_iiiiii);
jit_va_end(JIT_V0);
jit_ret();
@@ -771,7 +771,7 @@ int main(int argc, char *argv[])
jit_pushargi_d(1);
jit_pushargr_d(JIT_F3);
jit_pushargr_d(JIT_F4);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_ddd_ddddddd);
jit_va_end(JIT_V0);
jit_ret();
@@ -798,7 +798,7 @@ int main(int argc, char *argv[])
jit_pushargi_d(2);
jit_pushargr_d(JIT_F3);
jit_pushargr_d(JIT_F4);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_dddd_dddddd);
jit_va_end(JIT_V0);
jit_ret();
@@ -819,7 +819,7 @@ int main(int argc, char *argv[])
jit_pushargi(1);
jit_pushargr_d(JIT_F3);
jit_pushargr(JIT_V1);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_idi_dididid);
jit_va_end(JIT_V0);
jit_ret();
@@ -846,7 +846,7 @@ int main(int argc, char *argv[])
jit_pushargi_d(2);
jit_pushargr(JIT_V1);
jit_pushargr_d(JIT_F3);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_idid_ididid);
jit_va_end(JIT_V0);
jit_ret();
@@ -867,7 +867,7 @@ int main(int argc, char *argv[])
jit_pushargi_d(1);
jit_pushargr(JIT_V1);
jit_pushargr_d(JIT_F3);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_did_idididi);
jit_va_end(JIT_V0);
jit_ret();
@@ -894,7 +894,7 @@ int main(int argc, char *argv[])
jit_pushargi(2);
jit_pushargr_d(JIT_F3);
jit_pushargr(JIT_V1);
- jit_pushargr(JIT_V0);
+ jit_va_push(JIT_V0);
jit_finishi(va_didi_dididi);
jit_va_end(JIT_V0);
jit_ret();
diff --git a/check/lightning.c b/check/lightning.c
index 2572e62..448d251 100644
--- a/check/lightning.c
+++ b/check/lightning.c
@@ -497,7 +497,7 @@ static void bunordr_d(void); static void
bunordi_d(void);
static void pushargr_d(void); static void pushargi_d(void);
static void retr_d(void); static void reti_d(void);
static void retval_d(void);
-static void vastart(void);
+static void vastart(void); static void vapush(void);
static void vaarg(void); static void vaarg_d(void);
static void vaend(void);
@@ -811,6 +811,7 @@ static instr_t instr_vector[] = {
entry(retr_d), entry(reti_d),
entry(retval_d),
entry2("va_start", vastart),
+ entry2("va_push", vapush),
entry2("va_arg", vaarg),
entry2("va_arg_d", vaarg_d),
entry2("va_end", vaend),
@@ -1658,6 +1659,12 @@ vastart(void)
jit_va_start(r0);
}
static void
+vapush(void)
+{
+ jit_gpr_t r0 = get_ireg();
+ jit_va_push(r0);
+}
+static void
vaarg(void)
{
jit_gpr_t r0 = get_ireg(), r1 = get_ireg();
diff --git a/doc/body.texi b/doc/body.texi
index 09e9866..60f5692 100644
--- a/doc/body.texi
+++ b/doc/body.texi
@@ -400,15 +400,19 @@ that uses the appropriate wordsize call.
These are:
@example
prepare (not specified)
+va_start (not specified)
pushargr _f _d
pushargi _f _d
+va_push (not specified)
arg _c _uc _s _us _i _ui _l _f _d
getarg _c _uc _s _us _i _ui _l _f _d
+va_arg _d
putargr _f _d
putargi _f _d
ret (not specified)
retr _f _d
reti _f _d
+va_end (not specified)
retval _c _uc _s _us _i _ui _l _f _d
epilog (not specified)
@end example
@@ -425,6 +429,12 @@ the @code{pushargr} or @code{pushargi} to push the
arguments @strong{in
left to right order}; and use @code{finish} or @code{call} (explained below)
to perform the actual call.
address@hidden returns a @code{C} compatible @code{va_list}. To fetch
+arguments, use @code{va_arg} for integers and @code{va_arg_d} for doubles.
address@hidden is required when passing a @code{va_list} to another function,
+because not all architectures expect it as a single pointer. Known case
+is DEC Alpha, that requires it as a structure passed by value.
+
@code{arg}, @code{getarg} and @code{putarg} are used by the callee.
@code{arg} is different from other instruction in that it does not
actually generate any code: instead, it is a function which returns
diff --git a/include/lightning.h b/include/lightning.h
index c30dfd2..55657c8 100644
--- a/include/lightning.h
+++ b/include/lightning.h
@@ -202,6 +202,8 @@ typedef enum {
#define jit_ellipsis() _jit_ellipsis(_jit)
jit_code_ellipsis,
+#define jit_va_push(u) _jit_va_push(_jit,u)
+ jit_code_va_push,
#define jit_allocai(u) _jit_allocai(_jit,u)
#define jit_allocar(u, v) _jit_allocar(_jit,u,v)
jit_code_allocai, jit_code_allocar,
@@ -950,6 +952,7 @@ extern void _jit_putargi(jit_state_t*, jit_word_t,
jit_node_t*);
extern void _jit_prepare(jit_state_t*);
extern void _jit_ellipsis(jit_state_t*);
+extern void _jit_va_push(jit_state_t*, jit_gpr_t);
extern void _jit_pushargr(jit_state_t*, jit_gpr_t);
extern void _jit_pushargi(jit_state_t*, jit_word_t);
extern void _jit_finishr(jit_state_t*, jit_gpr_t);
diff --git a/lib/jit_aarch64-sz.c b/lib/jit_aarch64-sz.c
index 75a5e78..7e22e0e 100644
--- a/lib/jit_aarch64-sz.c
+++ b/lib/jit_aarch64-sz.c
@@ -11,6 +11,7 @@
0, /* label */
120, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_aarch64.c b/lib/jit_aarch64.c
index c1fb11d..2d0f2b4 100644
--- a/lib/jit_aarch64.c
+++ b/lib/jit_aarch64.c
@@ -371,6 +371,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1452,6 +1460,7 @@ _emit_code(jit_state_t *_jit)
vaarg_d(rn(node->u.w), rn(node->v.w));
break;
case jit_code_live: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
diff --git a/lib/jit_alpha-cpu.c b/lib/jit_alpha-cpu.c
index afc22bb..a590290 100644
--- a/lib/jit_alpha-cpu.c
+++ b/lib/jit_alpha-cpu.c
@@ -2689,7 +2689,10 @@ _vastart(jit_state_t *_jit, jit_int32_t r0)
stxi(offsetof(jit_va_list_t, base), r0, rn(reg));
/* Initialize the offset field */
- movi(rn(reg), _jitc->function->vagp * 8);
+ if (_jitc->function.vagp < 6)
+ movi(rn(reg), _jitc->function->vagp * 8);
+ else
+ movi(rn(reg), _jitc->function->self.size - (stack_framesize - 48));
stxi(offsetof(jit_va_list_t, offset), r0, rn(reg));
jit_unget_reg(reg);
diff --git a/lib/jit_alpha-sz.c b/lib/jit_alpha-sz.c
index c605d5b..e1a572a 100644
--- a/lib/jit_alpha-sz.c
+++ b/lib/jit_alpha-sz.c
@@ -11,6 +11,7 @@
0, /* label */
76, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_alpha.c b/lib/jit_alpha.c
index 90f8556..a950a33 100644
--- a/lib/jit_alpha.c
+++ b/lib/jit_alpha.c
@@ -346,6 +346,20 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_int32_t reg;
+ jit_inc_synth_w(va_push, u);
+ reg = jit_get_reg(jit_class_gpr);
+ jit_ldxi(reg, u, offsetof(jit_va_list_t, base));
+ jit_pushargr(reg);
+ jit_ldxi(reg, u, offsetof(jit_va_list_t, offset));
+ jit_pushargr(reg);
+ jit_unget_reg(reg);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1406,6 +1420,7 @@ _emit_code(jit_state_t *_jit)
vaarg_d(rn(node->u.w), rn(node->v.w));
break;
case jit_code_live: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
diff --git a/lib/jit_arm-sz.c b/lib/jit_arm-sz.c
index aa991f3..9f0d012 100644
--- a/lib/jit_arm-sz.c
+++ b/lib/jit_arm-sz.c
@@ -12,6 +12,7 @@
0, /* label */
34, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -415,6 +416,7 @@
0, /* label */
30, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_arm.c b/lib/jit_arm.c
index 6e73b1d..7578865 100644
--- a/lib/jit_arm.c
+++ b/lib/jit_arm.c
@@ -549,6 +549,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1885,6 +1893,7 @@ _emit_code(jit_state_t *_jit)
vfp_vaarg_d(rn(node->u.w), rn(node->v.w));
break;
case jit_code_live: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
diff --git a/lib/jit_hppa-sz.c b/lib/jit_hppa-sz.c
index 0903a69..3c04f63 100644
--- a/lib/jit_hppa-sz.c
+++ b/lib/jit_hppa-sz.c
@@ -11,6 +11,7 @@
0, /* label */
64, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_hppa.c b/lib/jit_hppa.c
index 41e2df2..bb71827 100644
--- a/lib/jit_hppa.c
+++ b/lib/jit_hppa.c
@@ -329,6 +329,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1387,6 +1395,7 @@ _emit_code(jit_state_t *_jit)
break;
case jit_code_live:
case jit_code_arg: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg_f: case jit_code_arg_d:
case jit_code_va_end:
diff --git a/lib/jit_ia64-sz.c b/lib/jit_ia64-sz.c
index 89c7fd7..59826d9 100644
--- a/lib/jit_ia64-sz.c
+++ b/lib/jit_ia64-sz.c
@@ -11,6 +11,7 @@
0, /* label */
224, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_ia64.c b/lib/jit_ia64.c
index d13232c..8f60b2e 100644
--- a/lib/jit_ia64.c
+++ b/lib/jit_ia64.c
@@ -432,6 +432,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1578,6 +1586,7 @@ _emit_code(jit_state_t *_jit)
break;
case jit_code_live:
case jit_code_arg: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg_f: case jit_code_arg_d:
case jit_code_va_end:
diff --git a/lib/jit_mips-sz.c b/lib/jit_mips-sz.c
index 208ef32..613aa00 100644
--- a/lib/jit_mips-sz.c
+++ b/lib/jit_mips-sz.c
@@ -12,6 +12,7 @@
0, /* label */
44, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -415,6 +416,7 @@
0, /* label */
116, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -817,6 +819,7 @@
0, /* label */
44, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_mips.c b/lib/jit_mips.c
index 53fa22e..cca3d76 100644
--- a/lib/jit_mips.c
+++ b/lib/jit_mips.c
@@ -489,6 +489,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1779,6 +1787,7 @@ _emit_code(jit_state_t *_jit)
break;
case jit_code_live:
case jit_code_arg: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg_f: case jit_code_arg_d:
case jit_code_va_end:
diff --git a/lib/jit_names.c b/lib/jit_names.c
index 2ef6a06..ba09a6a 100644
--- a/lib/jit_names.c
+++ b/lib/jit_names.c
@@ -24,7 +24,7 @@ static char *code_name[] = {
"#name", "#note",
"label",
"prolog",
- "ellipsis",
+ "ellipsis", "va_push",
"allocai", "allocar",
"arg",
"getarg_c", "getarg_uc",
diff --git a/lib/jit_ppc-sz.c b/lib/jit_ppc-sz.c
index c206b0f..22a6e25 100644
--- a/lib/jit_ppc-sz.c
+++ b/lib/jit_ppc-sz.c
@@ -12,6 +12,7 @@
0, /* label */
44, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -416,6 +417,7 @@
0, /* label */
136, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -821,6 +823,7 @@
0, /* label */
148, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -1226,6 +1229,7 @@
0, /* label */
124, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_ppc.c b/lib/jit_ppc.c
index 2c8a814..68db716 100644
--- a/lib/jit_ppc.c
+++ b/lib/jit_ppc.c
@@ -340,6 +340,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1603,6 +1611,7 @@ _emit_code(jit_state_t *_jit)
break;
case jit_code_live:
case jit_code_arg: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg_f: case jit_code_arg_d:
case jit_code_va_end:
diff --git a/lib/jit_s390-sz.c b/lib/jit_s390-sz.c
index d1d8861..bb8b2dc 100644
--- a/lib/jit_s390-sz.c
+++ b/lib/jit_s390-sz.c
@@ -11,6 +11,7 @@
2, /* label */
42, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -412,6 +413,7 @@
2, /* label */
42, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_s390.c b/lib/jit_s390.c
index 67335bf..27e8871 100644
--- a/lib/jit_s390.c
+++ b/lib/jit_s390.c
@@ -343,6 +343,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1480,6 +1488,7 @@ _emit_code(jit_state_t *_jit)
vaarg_d(rn(node->u.w), rn(node->v.w));
break;
case jit_code_live: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
diff --git a/lib/jit_sparc-sz.c b/lib/jit_sparc-sz.c
index 473c0ca..654e34e 100644
--- a/lib/jit_sparc-sz.c
+++ b/lib/jit_sparc-sz.c
@@ -11,6 +11,7 @@
0, /* label */
16, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_sparc.c b/lib/jit_sparc.c
index 2df67e4..16d2610 100644
--- a/lib/jit_sparc.c
+++ b/lib/jit_sparc.c
@@ -298,6 +298,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -1398,6 +1406,7 @@ _emit_code(jit_state_t *_jit)
vaarg_d(rn(node->u.w), rn(node->v.w));
break;
case jit_code_live: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
diff --git a/lib/jit_x86-sz.c b/lib/jit_x86-sz.c
index feb4c48..7183e6d 100644
--- a/lib/jit_x86-sz.c
+++ b/lib/jit_x86-sz.c
@@ -11,6 +11,7 @@
3, /* label */
34, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -413,6 +414,7 @@
7, /* label */
130, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -814,6 +816,7 @@
3, /* label */
108, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
@@ -1214,6 +1217,7 @@
7, /* label */
115, /* prolog */
0, /* ellipsis */
+ 0, /* va_push */
0, /* allocai */
0, /* allocar */
0, /* arg */
diff --git a/lib/jit_x86.c b/lib/jit_x86.c
index 0bbce1a..aae796b 100644
--- a/lib/jit_x86.c
+++ b/lib/jit_x86.c
@@ -620,6 +620,14 @@ _jit_ellipsis(jit_state_t *_jit)
jit_dec_synth();
}
+void
+_jit_va_push(jit_state_t *_jit, jit_int32_t u)
+{
+ jit_inc_synth_w(va_push, u);
+ jit_pushargr(u);
+ jit_dec_synth();
+}
+
jit_node_t *
_jit_arg(jit_state_t *_jit)
{
@@ -2075,6 +2083,7 @@ _emit_code(jit_state_t *_jit)
vaarg_d(rn(node->u.w), rn(node->v.w), jit_x87_reg_p(node->u.w));
break;
case jit_code_live: case jit_code_ellipsis:
+ case jit_code_va_push:
case jit_code_allocai: case jit_code_allocar:
case jit_code_arg:
case jit_code_arg_f: case jit_code_arg_d:
diff --git a/lib/lightning.c b/lib/lightning.c
index 166aebf..3120503 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -1253,8 +1253,8 @@ _jit_classify(jit_state_t *_jit, jit_code_t code)
switch (code) {
case jit_code_data: case jit_code_save: case jit_code_load:
case jit_code_name: case jit_code_label: case jit_code_note:
- case jit_code_prolog: case jit_code_ellipsis: case jit_code_epilog:
- case jit_code_ret: case jit_code_prepare:
+ case jit_code_prolog: case jit_code_ellipsis: case jit_code_va_push:
+ case jit_code_epilog: case jit_code_ret: case jit_code_prepare:
mask = 0;
break;
case jit_code_live: case jit_code_va_end:
- [Guile-commits] 297/437: Do not filter -sz.c files in gitignore, (continued)
- [Guile-commits] 297/437: Do not filter -sz.c files in gitignore, Andy Wingo, 2018/07/02
- [Guile-commits] 255/437: IA64: Force sync of instructions in get-jit-size build mode., Andy Wingo, 2018/07/02
- [Guile-commits] 306/437: x86: Build and pass all tests under cygwin64 (Windows x64), Andy Wingo, 2018/07/02
- [Guile-commits] 352/437: Update documentation, Andy Wingo, 2018/07/02
- [Guile-commits] 357/437: Make more readable always true test, Andy Wingo, 2018/07/02
- [Guile-commits] 311/437: Implement jit_frame and jit_tramp interfaces, Andy Wingo, 2018/07/02
- [Guile-commits] 312/437: Use jit_code_last_code as symbolic name of last enum, Andy Wingo, 2018/07/02
- [Guile-commits] 293/437: Do not have assertions with a long type test, Andy Wingo, 2018/07/02
- [Guile-commits] 384/437: ia64: Do not use a dangling pointer for double to integer copy, Andy Wingo, 2018/07/02
- [Guile-commits] 203/437: Make it simpler to add support for more than 64 registers., Andy Wingo, 2018/07/02
- [Guile-commits] 415/437: Build and pass all test cases on Alpha Linux,
Andy Wingo <=
- [Guile-commits] 142/437: Make current test cases pass in armv7l., Andy Wingo, 2018/07/02
- [Guile-commits] 188/437: Add framework for sparc port., Andy Wingo, 2018/07/02
- [Guile-commits] 227/437: Cosmetic removal of unused macros., Andy Wingo, 2018/07/02
- [Guile-commits] 330/437: Resync with new patch to make functions receive a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 185/437: Store all annotation information in the read only data buffer., Andy Wingo, 2018/07/02
- [Guile-commits] 170/437: Test and correct test cases in all current backends., Andy Wingo, 2018/07/02
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, Andy Wingo, 2018/07/02
- [Guile-commits] 355/437: Update documentation on jit_frame and jit_tramp, Andy Wingo, 2018/07/02
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 429/437: Remove disassembler support from lightning, Andy Wingo, 2018/07/02