gnustep-dev
[Top][All Lists]
Advanced

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

Re: sync.m


From: David Chisnall
Subject: Re: sync.m
Date: Wed, 3 Mar 2010 13:11:31 +0000

On 3 Mar 2010, at 09:48, Richard Frith-Macdonald wrote:

> David's libobjc2 code won't even build using the compiler on CentOS/Redhant 
> 4.5 (gcc-4.1.2)  and we almost certainly can't insist on people using 
> compilers younger than that... it's only three years old!


The only way to fix that is for someone to write some inline assembly for every 
single platform that we want to support that provides the atomic operations.

I'm not particularly interested in doing that, because GCC 4.2 supports the 
intrinsics (as does clang), is three years old next Saturday, and runs on all 
of the platforms that I'm interested in supporting.  Actually, according to the 
manual, these should work on 4.1.2 as well, so I'm not sure why you had a 
problem.  Possibly it was the -march=native (you need to specify a target CPU 
that actually supports atomic ops for the compiler to be able to generate code 
for them, so explicitly stating -march=i686 should work as a substitute):

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

In NSObject, we have a lot of code for doing atomic operations, to support old 
compilers, and we still don't have (for example) fast paths for SPARC, ARM, or 
MIPS unless you use GCC 4.2 or newer.  We only have fast paths on PowerPC and 
M68K because I wrote the former and worked with Riccardo to implement the 
latter.

David

-- Sent from my Difference Engine




reply via email to

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