This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-3.1-20020204 ICE on SSE2 inline assembler


The following source:

typedef int ___m128 __attribute__ ((mode(V4SI)));

typedef union {___m128 m128; unsigned char m128i_8[16];} __m128i;

inline __m128i _mm_cmpeq_epi8(__m128i a, __m128i b)
{
    __m128i alpha;
    asm("pcmpeqb %[param],%[inout]" :
        [inout] "=Y" (alpha.m128) :
        "[inout]" (a.m128),
        [param] "Y" (b.m128));
    return alpha;
}

int main(void)
{
    __m128i a,b;
    a = _mm_cmpeq_epi8(b,b);
}

gives an error message "internal error: Segmentation fault" at line 10 (the
line with the asm command), when compiled with gcc-3.1 -msse2 -S using the
20010204 snapshot. I've no idea what's causing this; how do I find out?

I'm pretty sure the syntax of the asm command is correct, and suspect the
compiler shouldn't segfault even if the syntax were wrong.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]