[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 35/437: remove pushr/popr from testsuite
From: |
Andy Wingo |
Subject: |
[Guile-commits] 35/437: remove pushr/popr from testsuite |
Date: |
Mon, 2 Jul 2018 05:13:40 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 82d90f4ddc106849c7c019c3948ce513c34432cd
Author: Paolo Bonzini <address@hidden>
Date: Mon Nov 6 09:24:36 2006 +0000
remove pushr/popr from testsuite
2006-11-04 Paolo Bonzini <address@hidden>
* tests/rpn.c: Remove pushr/popr.
git-archimport-id: address@hidden/lightning--stable--1.2--patch-37
---
ChangeLog | 4 ++++
tests/rpn.c | 25 +++++++++++++++++++++----
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 17d6b56..287cdda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-11-04 Paolo Bonzini <address@hidden>
+ * tests/rpn.c: Remove pushr/popr.
+
+2006-11-04 Paolo Bonzini <address@hidden>
+
* lightning/ppc/core.h: Implement jit_allocai, define JIT_FP to be R1.
* lightning/ppc/funcs.h: Store frame size into _jitl. Store R1 before
the STMW, so that the offset is unchanged when we patch the STMW.
diff --git a/tests/rpn.c b/tests/rpn.c
index c3b85a1..5a63a1f 100644
--- a/tests/rpn.c
+++ b/tests/rpn.c
@@ -172,6 +172,20 @@ gen_reg_reg (int src1, int src2, int tok)
}
}
+static void
+pushr (int reg, int *sp)
+{
+ jit_stxi_i (*sp, JIT_FP, reg);
+ *sp += sizeof (int);
+}
+
+static void
+popr (int reg, int *sp)
+{
+ *sp -= sizeof (int);
+ jit_ldxi_i (reg, JIT_FP, *sp);
+}
+
/* This function does all of lexing, parsing, and picking a good
order of evaluation... Needless to say, this is not the best
possible design, but it avoids cluttering everything with globals. */
@@ -181,6 +195,7 @@ compile_rpn (char *expr)
struct stack_element stack[32];
int sp = 0;
int curr_tos = -1; /* stack element currently in R0 */
+ int spill_base, spill_sp;
pifi fn;
int ofs;
@@ -188,6 +203,8 @@ compile_rpn (char *expr)
jit_leaf (1);
ofs = jit_arg_i ();
+ spill_sp = spill_base = jit_allocai (32 * sizeof (int));
+
while (*expr)
{
int with_imm;
@@ -333,7 +350,7 @@ compile_rpn (char *expr)
src2 = JIT_R0;
}
else
- jit_popr_i (JIT_V0);
+ popr (JIT_V0, &spill_sp);
curr_tos = -1;
break;
@@ -350,7 +367,7 @@ compile_rpn (char *expr)
/* LHS is an immediate, check if we must spill the top of stack. */
if (curr_tos != -1)
{
- jit_pushr_i (JIT_R0);
+ pushr (JIT_R0, &spill_sp);
curr_tos = -1;
}
@@ -361,7 +378,7 @@ compile_rpn (char *expr)
/* LHS is an expression, check if it is already in JIT_R0. */
if (curr_tos != sp - 2)
{
- jit_popr_i (src1);
+ popr (src1, &spill_sp);
curr_tos = -1;
}
else
@@ -371,7 +388,7 @@ compile_rpn (char *expr)
case ARG:
if (curr_tos != -1)
{
- jit_pushr_i (JIT_R0);
+ pushr (JIT_R0, &spill_sp);
curr_tos = -1;
}
- [Guile-commits] 26/437: fix i386 syntax error, (continued)
- [Guile-commits] 26/437: fix i386 syntax error, Andy Wingo, 2018/07/02
- [Guile-commits] 08/437: fixes to sparc floating point, Andy Wingo, 2018/07/02
- [Guile-commits] 10/437: add more autotools-generated files, Andy Wingo, 2018/07/02
- [Guile-commits] 23/437: fix `make dist' bug and prepare for releasing 1.2a, Andy Wingo, 2018/07/02
- [Guile-commits] 27/437: Fix assertion failures in i386 movs and movz opcodes, Andy Wingo, 2018/07/02
- [Guile-commits] 21/437: clarify bundling documentation and improve autoconf macro, Andy Wingo, 2018/07/02
- [Guile-commits] 32/437: fix powerpc jit_bms, Andy Wingo, 2018/07/02
- [Guile-commits] 24/437: bump version, add ldxi test case, Andy Wingo, 2018/07/02
- [Guile-commits] 30/437: added ret test and clarified JIT_RET documentation, Andy Wingo, 2018/07/02
- [Guile-commits] 20/437: fix PPC modi, Andy Wingo, 2018/07/02
- [Guile-commits] 35/437: remove pushr/popr from testsuite,
Andy Wingo <=
- [Guile-commits] 31/437: prepare for automatic variables support, Andy Wingo, 2018/07/02
- [Guile-commits] 29/437: cherrypick from ludovic courtes, Andy Wingo, 2018/07/02
- [Guile-commits] 33/437: add jit_allocai for SPARC, Andy Wingo, 2018/07/02
- [Guile-commits] 16/437: Fix comments in config.h.in git-archimport-id: address@hidden/lightning--stable--1.2--patch-18, Andy Wingo, 2018/07/02
- [Guile-commits] 37/437: fix x86-64 builds, Andy Wingo, 2018/07/02
- [Guile-commits] 42/437: add an underscore to macros without a parameter [x86], Andy Wingo, 2018/07/02
- [Guile-commits] 36/437: update manual for jit_allocai, Andy Wingo, 2018/07/02
- [Guile-commits] 46/437: merge from ludovic, Andy Wingo, 2018/07/02
- [Guile-commits] 14/437: update FSF address, Andy Wingo, 2018/07/02
- [Guile-commits] 34/437: finish jit_allocai implementation, Andy Wingo, 2018/07/02