guile-commits
[Top][All Lists]
Advanced

[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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]