While doing (or trying to) some cleanup thanks to -mcx16, i've been a
bit surprised that
<--< cut <--<
typedef int TItype __attribute__ ((mode (TI)));
TItype m_128;

void test(TItype x_128)
{
        m_128 = __sync_val_compare_and_swap (&m_128, x_128, m_128);
}

#include <xmmintrin.h>
typedef __m128i foo_t;
//typedef TItype foo_t;
foo_t foo;

void test2(foo_t x_128)
{
        foo = __sync_val_compare_and_swap (&foo, x_128, foo);
}

int main() { return 0; }
<--< cut <--<

# /usr/local/gcc-4.3-20070323/bin/gcc -O2 -mcx16 xchg16.c -o xchg16
xchg16.c: In function 'test2':
xchg16.c:16: error: incompatible type for argument 1 of
'__sync_val_compare_and_swap'

# /usr/local/gcc-4.3-20070323/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local/gcc-4.3-20070323
--enable-languages=c++ --enable-threads=posix --with-system-zlib
--enable-__cxa_atexit --disable-checking --disable-nls
--disable-multilib --enable-bootstrap --with-gcc --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 4.3.0 20070323 (experimental)

Am i just wrong believing that ought to work?

Reply via email to