This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __sync_val_compare_and_swap_16
- From: Andrew Haley <aph at redhat dot com>
- To: Robert Lemmen <robertle at semistable dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 27 Jun 2008 14:13:13 +0100
- Subject: Re: __sync_val_compare_and_swap_16
- References: <20080627125712.GA16696@semistable.com>
Robert Lemmen wrote:
> hi folks,
>
> i want to use the builtin __sync_val_compare_and_swap on 128 bit
> datatypes. older versions of ggc always gave me a "incompatible type for
> argument 1 of '__sync_val_compare_and_swap'", which took as "not
> supported". now i am using a current version of the compiler, and it
> does give me a "undefined reference to `__sync_val_compare_and_swap_16",
> which i dont understand. obviously the compiler does now know about t,
> but does not fully support it. it does of course work with 64 bit
> arguments. i sthere anything i need to do? some switch? or link
> something in? or does this just mean support for it is not yet fully
> there?
It depends on the actual processor type you're using. Not every
processor has a 128-bit atomic exchange. gcc uses the -mcpu=
switch to control the processor.
Andrew.