Ian Lance Taylor <i...@google.com> writes:

> Looks like sparc64 broke for libgo when parallel garbage collection was
> introduced.  This patch is an attempt to get it working again.
> Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu, not that
> that proves much.  Committed to mainline.

I needed the following patch on top of yours to get it to compile on
Solaris/SPARC.  The #undefs are necessary to avoid redefinition
errors.  This massivly improves Solaris/SPARC testsuite results,
though there are still a few common Solaris failures and a few others
that might be endianess issues.

        Rainer


diff --git a/libgo/runtime/lfstack.c b/libgo/runtime/lfstack.c
--- a/libgo/runtime/lfstack.c
+++ b/libgo/runtime/lfstack.c
@@ -19,7 +19,10 @@
 
 #if __SIZEOF_POINTER__ == 8 && defined(__sparc__)
 // SPARC64 uses all 64 bits of virtual addresses.  Use low-order three
-bits as ABA counter.
+// bits as ABA counter.
+#undef PTR_BITS
+#undef CNT_MASK
+#undef PTR_MASK
 #define PTR_BITS 0
 #define CNT_MASK 7
 #define PTR_MASK ((0ull-1)<<3)
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to