Andrew Haley aph@redhat.com
Fri Jun 27 13:13:00 GMT 2008

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.


More information about the Gcc-help mailing list