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

Ivan Maidanski ivmai at mail.ru
Sat Dec 19 09:23:42 PST 2009


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