Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Richard Henderson
On 11/10/2011 02:28 PM, Andrew MacLeod wrote: > * doc/extend.texi: Document __atomic_test_and_set and __atomic_clear. ok. r~

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Andrew MacLeod
On 11/10/2011 04:50 PM, Andrew MacLeod wrote: On 11/10/2011 04:19 PM, Hans-Peter Nilsson wrote: Test cross to cris-elf in progress for your second take (at r181254 + Bernd's patch to unbreak the tree And it works without regressions. Thanks! brgds, H-P excellent. Its all checked in too. A

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Andrew MacLeod
On 11/10/2011 04:19 PM, Hans-Peter Nilsson wrote: Test cross to cris-elf in progress for your second take (at r181254 + Bernd's patch to unbreak the tree And it works without regressions. Thanks! brgds, H-P excellent. Its all checked in too. Andrew

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 10 Nov 2011 19:06:26 +0100 > > From: Andrew MacLeod > > Date: Thu, 10 Nov 2011 17:52:44 +0100 > > On 11/10/2011 11:48 AM, Andrew MacLeod wrote: > > > Justa minute > > > > > > Andrew > > doh. sorry about that > > Test cross to cris-elf in progress for yo

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Hans-Peter Nilsson
> From: Andrew MacLeod > Date: Thu, 10 Nov 2011 17:52:44 +0100 > On 11/10/2011 11:48 AM, Andrew MacLeod wrote: > > Justa minute > > > > Andrew > doh. sorry about that Test cross to cris-elf in progress for your second take (at r181254 + Bernd's patch to unbreak the tree for arm-linux-gnueabi an

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Richard Henderson
On 11/10/2011 08:52 AM, Andrew MacLeod wrote: > libstdc++-v3 > * include/bits/atomic_base.h (atomic_thread_fence): Call built-in. > (atomic_signal_fence): Call built-in. > (test_and_set, clear): Call new atomic built-ins. > > gcc > * builtins.c (expand_builtin_a

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Andrew MacLeod
On 11/10/2011 11:48 AM, Andrew MacLeod wrote: On 11/10/2011 11:47 AM, Richard Henderson wrote: On 11/10/2011 08:35 AM, Andrew MacLeod wrote: Currently I don't issue any warnings ... What are those then? And, obviously the cris test should be an effective target test. Oh, those are gone, I

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Andrew MacLeod
On 11/10/2011 11:47 AM, Richard Henderson wrote: On 11/10/2011 08:35 AM, Andrew MacLeod wrote: Currently I don't issue any warnings ... What are those then? And, obviously the cris test should be an effective target test. Oh, those are gone, I must not have re-svn'd Justa minute Andrew

Re: [PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Richard Henderson
On 11/10/2011 08:35 AM, Andrew MacLeod wrote: > Currently I don't issue any warnings ... > + /* Otherwise issue the store and a warning. */ > + warning_at (loc, 0, > + "__atomic_clear used on target with no atomic support"); > + __atomic_clear (&a, __ATOMIC_RELAXED);

[PATCH] pr51038 atomic_flag on targets with no atomic support.

2011-11-10 Thread Andrew MacLeod
The issue here is no atomic support whatsoever. The standard now *requires* that atomic_flag be implementable in a lock free manner for compliance. That means they must resolve to something, and not an external library call. In order to support atomic_flag in a lock free manner on a target,