Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/mozilla-thunderbird/3.1.1: 1003-fix_sparc_build.patch
Date: Sat, 31 Jul 2010 21:03:24
Message-Id: 20100731201545.1DCCA2CC0B@corvid.gentoo.org
polynomial-c    10/07/31 20:15:45

  Added:                1003-fix_sparc_build.patch
  Log:
  Sparc patch as per request from armin76.

Revision  Changes    Path
1.1                  src/patchsets/mozilla-thunderbird/3.1.1/1003-fix_sparc_build.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/mozilla-thunderbird/3.1.1/1003-fix_sparc_build.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/mozilla-thunderbird/3.1.1/1003-fix_sparc_build.patch?rev=1.1&content-type=text/plain

Index: 1003-fix_sparc_build.patch
===================================================================
--- comm-1.9.2/mozilla/js/src/nanojit/CodeAlloc.cpp
+++ comm-1.9.2/mozilla/js/src/nanojit/CodeAlloc.cpp
@@ -247,8 +247,20 @@
 #endif
 
 #ifdef AVMPLUS_SPARC
+#ifdef __linux__  // bugzilla 502369
+void sync_instruction_memory(caddr_t v, u_int len)
+{
+    caddr_t end = v + len;
+    caddr_t p = v;
+    while (p < end) {
+        asm("flush %0" : : "r" (p));
+        p += 32;
+    }
+}
+#else
 extern  "C" void sync_instruction_memory(caddr_t v, u_int len);
 #endif
+#endif
 
 #if defined NANOJIT_IA32 || defined NANOJIT_X64
     // intel chips have dcache/icache interlock