Re[6]: [Gc] atomic_ops: bugfix for Solaris x86/amd64

Ivan Maidanski ivmai at mail.ru
Wed Feb 3 23:37:54 PST 2010


Hi!
"Richard O'Keefe" <ok at cs.otago.ac.nz> wrote:
> On Feb 4, 2010, at 9:29 AM, Ivan Maidanski wrote:
> > AFAIK, v9 is always 64-bit (so it's ok to -D AO_NO_SPARC_V9 if you  
> > know the target is 32-bit).
> 
> I have a SPARC Ultra II on my desk.  The hardware is supported by both
> 32-bit and 64-bit kernels.  The 64-bit kernel can run both 32-bit and
> 64-bit programs.
> 
> Using the Sun C compiler, you compile for 32-bit mode using
> -m32 and for 64-bit mode using -m64.  As I only have about
> 1.5 GB of memory, I normally use 32-bit mode, just compiling
> in 64-bit mode from time to time to make sure it works.
> With the compiler release I have, -m32 is the default.

Same as for x86.

> 
> By experiment, if you compile with the -m64 option, you get
> 	-D__sparcv9
> and if you compile with the -m32 option, you don't.

This means v9 is always 64-bit ;).
More formal, __sparcv9 seems to be equivalent to __sparc && __arch64__, so AO_NO_SPARC_V9 can't be replaced with !__sparcv9 (I mean __sparcv9 can't be used for the feature test).

It would be good if someone contributed a patch for configure.ac adding "#define AO_NO_SPARC_V9" to config.h when necessary.

Bye.


More information about the Gc mailing list