Support sparcv9 32-bit build
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 16 Nov 2009 20:27:50 +0000 (15:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 16 Nov 2009 20:27:50 +0000 (15:27 -0500)
From: David Miller <davem@davemloft.net>
Subject: Re: [ltt-dev] Sparc64 support added to Userspace RCU

From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Date: Thu, 22 Oct 2009 15:57:53 -0400

> Feedback is welcome,

__sparc_v8__ does not mean 64-bit longs or pointers as implied here:

"v8" was the last 32-bit standard of the cpu architecture.

Otherwise looks fine.

Although this port won't be very useful until it can be built in
32-bit mode.  As most applications on sparc64 systems are still
32-bit.  Like on powerpc, people only rarely build things 64-bit on
sparc64.

You need to build with "-Wa,-Av9a" on the GCC command line for that
case so that the assembler allows the v9 instructions emitted by your
macros, even when building for 32-bit.

Hope this helps.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: David Miller <davem@davemloft.net>
README
urcu/uatomic_arch_sparc64.h

diff --git a/README b/README
index 883b808a3bed372f1dd2597e3e983b9f6c73eae2..ca23d43fe3bee6b5e62d5cfcd0489bb93c7ffc2b 100644 (file)
--- a/README
+++ b/README
@@ -18,11 +18,14 @@ BUILDING
                Forcing a 32-bit build with 386 backward compatibility:
                * CFLAGS="-m32 -g -O2" ./configure --host=i386-pc-linux-gnu
 
+               Forcing a 32-bit build for Sparcv9 (typical for Sparc v9)
+               * CFLAGS="-m32 -Wa,-Av9a -g -O2" ./configure
+
 ARCHITECTURES SUPPORTED
 -----------------------
 
 Currently, x86 (i386, i486, i586, i686), x86 64-bit, PowerPC 32/64, S390, S390x
-and Sparc64 are supported. Only tested on Linux so far, but should
+and Sparcv9 32/64 are supported. Only tested on Linux so far, but should
 theoretically work on other operating systems.
 
 QUICK START GUIDE
index 35b9ac269c11197b52eac7d55546a7d3479586ed..28829d285811bfabce58ffc00847ff645f70e460 100644 (file)
@@ -24,7 +24,7 @@
 #include <urcu/system.h>
 
 #ifndef __SIZEOF_LONG__
-#if (defined(__sparc_v8__) || defined(__sparc_v9__))
+#ifdef __LP64__
 #define __SIZEOF_LONG__ 8
 #else
 #define __SIZEOF_LONG__ 4
This page took 0.026498 seconds and 4 git commands to generate.