[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 221/437: Correct build and pass all tests on Solaris Spa
From: |
Andy Wingo |
Subject: |
[Guile-commits] 221/437: Correct build and pass all tests on Solaris Sparc. |
Date: |
Mon, 2 Jul 2018 05:14:25 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit af92c5adfe9be1f4c253f41d01f12178c795de81
Author: pcpa <address@hidden>
Date: Tue Jun 18 22:54:29 2013 -0300
Correct build and pass all tests on Solaris Sparc.
* lib/jit_sparc-cpu.c: Correct compiler warning of value
used before assignment. The usage is bogus as the api
requires always patching jumps, but the random value used
could cause an assertion due to invalid displacement.
* lib/jit_sparc.c: Always load and store double arguments
in stack as 2 float loads or stores, for safety, as unaligned
access is not allowed in Sparc Solaris.
---
ChangeLog | 11 +++++++++++
check/lightning.c | 4 ++--
lib/jit_sparc-cpu.c | 2 +-
lib/jit_sparc.c | 16 ++++++++++++----
4 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 60402a4..e357774 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-06-18 Paulo Andrade <address@hidden>
+
+ * lib/jit_sparc-cpu.c: Correct compiler warning of value
+ used before assignment. The usage is bogus as the api
+ requires always patching jumps, but the random value used
+ could cause an assertion due to invalid displacement.
+
+ * lib/jit_sparc.c: Always load and store double arguments
+ in stack as 2 float loads or stores, for safety, as unaligned
+ access is not allowed in Sparc Solaris.
+
2013-06-14 Paulo Andrade <address@hidden>
* configure.ac: Force -mlp64 to CFLAGS on HP-UX ia64 port.
diff --git a/check/lightning.c b/check/lightning.c
index 3f785a3..aa29e38 100644
--- a/check/lightning.c
+++ b/check/lightning.c
@@ -33,8 +33,8 @@
# include <fpu_control.h>
#endif
-/* The label_t identifier clashes with a definition in sys/types.h */
-#if defined(_AIX)
+/* The label_t identifier clashes with a system definitions */
+#if defined(_AIX) || defined(__sun__)
# define label_t l_label_t
#endif
diff --git a/lib/jit_sparc-cpu.c b/lib/jit_sparc-cpu.c
index 3ddbfd9..956840a 100644
--- a/lib/jit_sparc-cpu.c
+++ b/lib/jit_sparc-cpu.c
@@ -1562,7 +1562,7 @@ _jmpi(jit_state_t *_jit, jit_word_t i0)
{
jit_word_t w;
jit_int32_t reg;
- w = (i0 - w) >> 2;
+ w = (i0 - _jit->pc.w) >> 2;
if (s22_p(w)) {
BA(w);
NOP();
diff --git a/lib/jit_sparc.c b/lib/jit_sparc.c
index 5142c8c..0915192 100644
--- a/lib/jit_sparc.c
+++ b/lib/jit_sparc.c
@@ -372,8 +372,10 @@ _jit_getarg_d(jit_state_t *_jit, jit_int32_t u, jit_node_t
*v)
jit_ldxi_f(u, JIT_FP, -8);
jit_ldxi_f(u + 1, JIT_FP, stack_framesize);
}
- else
- jit_ldxi_d(u, JIT_FP, v->u.w);
+ else {
+ jit_ldxi_f(u, JIT_FP, v->u.w);
+ jit_ldxi_f(u + 1, JIT_FP, v->u.w + 4);
+ }
}
void
@@ -455,7 +457,10 @@ _jit_pushargr_d(jit_state_t *_jit, jit_int32_t u)
_jitc->function->call.size += sizeof(jit_float32_t);
}
else {
- jit_stxi_d(_jitc->function->call.size + stack_framesize, JIT_SP, u);
+ jit_stxi_f(_jitc->function->call.size + stack_framesize,
+ JIT_SP, u);
+ jit_stxi_f(_jitc->function->call.size + stack_framesize + 4,
+ JIT_SP, u + 1);
_jitc->function->call.size += sizeof(jit_float64_t);
}
}
@@ -480,7 +485,10 @@ _jit_pushargi_d(jit_state_t *_jit, jit_float64_t u)
_jitc->function->call.size += sizeof(jit_float32_t);
}
else {
- jit_stxi_d(_jitc->function->call.size + stack_framesize, JIT_SP, regno);
+ jit_stxi_f(_jitc->function->call.size + stack_framesize,
+ JIT_SP, regno);
+ jit_stxi_f(_jitc->function->call.size + stack_framesize + 4,
+ JIT_SP, regno + 1);
_jitc->function->call.size += sizeof(jit_float64_t);
}
jit_unget_reg(regno);
- [Guile-commits] 173/437: Add filename and line number annotation abstraction., (continued)
- [Guile-commits] 173/437: Add filename and line number annotation abstraction., Andy Wingo, 2018/07/02
- [Guile-commits] 201/437: Do not start over jit generation if can safely grow buffer size., Andy Wingo, 2018/07/02
- [Guile-commits] 152/437: Remove most type casts and compile test tool silently with -Wall, Andy Wingo, 2018/07/02
- [Guile-commits] 208/437: Implement fpr register arguments and minor extra fixes., Andy Wingo, 2018/07/02
- [Guile-commits] 211/437: Correct the cvt.tst test case on Itanium., Andy Wingo, 2018/07/02
- [Guile-commits] 187/437: Correct regression with float arguments in arm hardp, Andy Wingo, 2018/07/02
- [Guile-commits] 200/437: Add a simple memory management wrapper., Andy Wingo, 2018/07/02
- [Guile-commits] 196/437: Add missing __ppc__ definition., Andy Wingo, 2018/07/02
- [Guile-commits] 159/437: Correct stack.tst test case on ppc. Now all tests pass in all backends., Andy Wingo, 2018/07/02
- [Guile-commits] 172/437: Rework {get, push}arg{, i, r}_{f, d} to a more descriptive name and usage., Andy Wingo, 2018/07/02
- [Guile-commits] 221/437: Correct build and pass all tests on Solaris Sparc.,
Andy Wingo <=
- [Guile-commits] 228/437: Properly check tests output., Andy Wingo, 2018/07/02
- [Guile-commits] 186/437: Add code to release all memory used by the jit state., Andy Wingo, 2018/07/02
- [Guile-commits] 137/437: Make mips backend compile on a qemu image., Andy Wingo, 2018/07/02
- [Guile-commits] 222/437: Correct build and pass all tests on Solaris x86., Andy Wingo, 2018/07/02
- [Guile-commits] 219/437: Remove redundancy in the hppa cache synchronization code., Andy Wingo, 2018/07/02
- [Guile-commits] 245/437: S390X: Correct values of float registers saved on stack., Andy Wingo, 2018/07/02
- [Guile-commits] 224/437: Correct mips o32 abi that was broken when adding n32 abi support., Andy Wingo, 2018/07/02
- [Guile-commits] 230/437: New s390x port built on the hercules emulator and fedora 16 image., Andy Wingo, 2018/07/02
- [Guile-commits] 234/437: GNU lightning 2.0.0 release, Andy Wingo, 2018/07/02
- [Guile-commits] 256/437: X86: %r12 may be used as an index register., Andy Wingo, 2018/07/02