guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 91/437: fix miscellaneous PPC-32 back-end bugs


From: Andy Wingo
Subject: [Guile-commits] 91/437: fix miscellaneous PPC-32 back-end bugs
Date: Mon, 2 Jul 2018 05:13:52 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit b3817a102e4916321968c66008a2149dd2987d05
Author: Laurent Michel <address@hidden>
Date:   Thu Jul 10 16:09:05 2008 +0200

    fix miscellaneous PPC-32 back-end bugs
    
    2008-07-02  Laurent Michel  <address@hidden>
    
        * lightning/ppc/funcs.h (jit_flush_code): modified the computation
        of start/end. The pointer arithmetic was done without casting. It
        prevented compilation with recent gcc versions.
        * lightning/ppc/core.h (jit_pushr_i): The offset for the store was
        incorrect. Should have been 4 bytes below SP (not above).
        * lightning/ppc/core.h (jit_popr_i): The offset for the load was
        incorrect. Should have been 0 (not +8).
---
 ChangeLog             | 10 ++++++++++
 lightning/ppc/core.h  |  4 ++--
 lightning/ppc/funcs.h |  4 ++--
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0eda217..b3485b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-07-02  Laurent Michel  <address@hidden>
+
+       * lightning/ppc/funcs.h (jit_flush_code): modified the computation
+       of start/end. The pointer arithmetic was done without casting. It
+       prevented compilation with recent gcc versions. 
+       * lightning/ppc/core.h (jit_pushr_i): The offset for the store was
+       incorrect. Should have been 4 bytes below SP (not above).
+       * lightning/ppc/core.h (jit_popr_i): The offset for the load was 
+       incorrect. Should have been 0 (not +8). 
+
 2008-06-17  Paolo Bonzini  <address@hidden>
 
        * lightning/i386/asm-64.h: Forward IMULQir to IMULQirr,
diff --git a/lightning/ppc/core.h b/lightning/ppc/core.h
index c26566d..6772e4f 100644
--- a/lightning/ppc/core.h
+++ b/lightning/ppc/core.h
@@ -259,8 +259,8 @@ struct jit_local_state {
 #define jit_orr_i(d, s1, s2)                             ORrrr((d), (s1), (s2))
 
 #ifdef JIT_NEED_PUSH_POP
-#define jit_popr_i(rs)                 (LWZrm((rs), 8, 1), ADDIrri(1, 1, 4))
-#define jit_pushr_i(rs)                        (STWrm((rs), 4, 1), ADDIrri (1, 
1, -4))
+#define jit_popr_i(rs)                 (LWZrm((rs),  0, 1), ADDIrri(1, 1, 4))
+#define jit_pushr_i(rs)                        (STWrm((rs), -4, 1), ADDIrri 
(1, 1, -4))
 #endif
 
 #define jit_prepare_i(numi)            (_jitl.nextarg_puti = numi)
diff --git a/lightning/ppc/funcs.h b/lightning/ppc/funcs.h
index 131687b..9f3df90 100644
--- a/lightning/ppc/funcs.h
+++ b/lightning/ppc/funcs.h
@@ -67,8 +67,8 @@ jit_flush_code(void *start, void *end)
         break;
   }
 
-  start -= ((long) start) & (cache_line_size - 1);
-  end -= ((long) end) & (cache_line_size - 1);
+  start =(void*)( (long)start - (((long) start) & (cache_line_size - 1)));
+  end   =(void*)( (long)end   - (((long) end) & (cache_line_size - 1)));
 
   /* Force data cache write-backs */
   for (ddest = (char *) start; ddest <= (char *) end; ddest += 
cache_line_size) {



reply via email to

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