Hi,
I tried building the trivial attached foo.c with "gcc -o foo foo.c",
and it worked fine on i386 and didn't work on ia64. As I understand
it, this function can either be implemented with assembly if the
subarch permits it (and the relevant -m flag is present), or via a
function call (says info gcc-4.1, "Atomic Builtins").
So, I suppose the problem is one of:
- not passing the relevant -m flag
- compiler bug
- not checking whether this builtin works at configure time
Should this be forwarded to gcc folks?
Bye,
--
Loïc Minier <[EMAIL PROTECTED]>
int
g_atomic_pointer_compare_and_exchange (volatile void* *atomic,
void * oldval,
void * newval)
{
return __sync_bool_compare_and_swap ((long *)atomic,
(long)oldval, (long)newval);
}
int main(void) {
return 0;
}