guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 383/437: ia64: Implement cache flush.


From: Andy Wingo
Subject: [Guile-commits] 383/437: ia64: Implement cache flush.
Date: Mon, 2 Jul 2018 05:15:00 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit f48e07b58b2a62dfdab3779e21e4802922f1bd29
Author: Paulo Andrade <address@hidden>
Date:   Sun May 10 16:22:26 2015 -0300

    ia64: Implement cache flush.
    
        * lib/jit_ia64.c: Implement inline assembly cache flush,
        required on multiprocessor systems.
---
 ChangeLog      | 5 +++++
 lib/jit_ia64.c | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 2914410..2e1d363 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-10 Paulo Andrade <address@hidden>
+
+       * lib/jit_ia64.c: Implement inline assembly cache flush,
+       required on multiprocessor systems.
+
 2015-06-06 Paulo Andrade <address@hidden>
 
        * lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips.c:
diff --git a/lib/jit_ia64.c b/lib/jit_ia64.c
index dc4ac85..172050b 100644
--- a/lib/jit_ia64.c
+++ b/lib/jit_ia64.c
@@ -1494,7 +1494,14 @@ jit_flush(void *fptr, void *tptr)
     s = sysconf(_SC_PAGE_SIZE);
     f = (jit_word_t)fptr & -s;
     t = (((jit_word_t)tptr) + s - 1) & -s;
+#  if 0
     __clear_cache((void *)f, (void *)t);
+#  else
+    /* __clear_cache is a noop in (old?) gcc, but cache flush is
+     * required on a multi processor Linux system. */
+    for (s = f; s < t; s += 32)
+       asm volatile("fc %0" :: "r"(s) : "memory");
+#  endif
 #endif
 }
 



reply via email to

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