[Gc] Re: lwsync used on e500(v2) targets

Herman ten Brugge hermantenbrugge at home.nl
Sat Dec 19 13:28:00 PST 2009


When I look in gcc head and do:

svn log gc_locks.h | grep '^r'
r155198 | doko | 2009-12-13 23:44:27 +0100 (Sun, 13 Dec 2009) | 5 lines
r150018 | meissner | 2009-07-23 18:05:37 +0200 (Thu, 23 Jul 2009) | 1 line
r138078 | meissner | 2008-07-23 13:06:42 +0200 (Wed, 23 Jul 2008) | 1 line
r130805 | dberlin | 2007-12-13 02:53:37 +0100 (Thu, 13 Dec 2007) | 2 lines
....

I do not see any patch created by bdwgc. Are we talking about the same file?
My patch is not present in gcc head as far as I can tell.

     Herman

On 12/19/09 18:23, Ivan Maidanski wrote:
> Hi!
> Herman ten Brugge<hermantenbrugge at home.nl>  wrote:
>    
>> The lwsync assembly code is used on the e500(v2) targets in the boehm
>> garbage collector.
>> These targets do not support that instruction.
>>
>> I have created a patch to solve this problem. (see also
>> libstdc++-v3/config/cpu/powerpc/atomic_word.h)
>> If is is approved please apply it.
>>      
> Thanks. But it's already there (for gcc) since 2008-08-19 [bdwgc]. I only put the similar code for ibm C (I don't know whether that file actually compilable/working but...).
>
>
>    
>>       Herman
>>
>>
>> --- gc_locks.h.org	2009-12-19 12:16:04.562138437 +0100
>> +++ gc_locks.h	2009-12-19 12:15:52.951849582 +0100
>> @@ -164,7 +164,11 @@
>>             return oldval;
>>           }
>>         inline static void GC_clear(volatile unsigned int *addr) {
>> +#ifdef __NO_LWSYNC__
>> +	__asm__ __volatile__("sync" : : : "memory");
>> +#else
>>   	__asm__ __volatile__("lwsync" : : : "memory");
>> +#endif
>>           *(addr) = 0;
>>         }
>>   #    endif
>>      
> Bye.
>
>    



More information about the Gc mailing list