This is the mail archive of the 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]

Re: SSE and SSE2 intrinsics

> On Mon, Feb 04, 2002 at 12:44:20PM -0000, Tom Womack wrote:
>> I worked out I should do typedef int __m128i ((attribute V4SI)) to get
>> the right type, but I couldn't find in the documentation any indication
>> of what I should use in gcc where I'd use _mm_cmpgt_epi8 in
>> VC++; indeed, even looking through I couldn't find an
>> instruction-definition for the SSE2 extended-MMX compare
>> instructions.

>> I was somehow expecting a file that I could #include to get Intel
>> intrinsics recognised, but I couldn't find one even by grepping
>> through the source tree.

> It's there -- #include <xmmintrin.h> or <mmintrin.h> just like the
> Intel compiler.  Oh, I see.  You said you were using the
> 2001-12-31 snapshot.  These headers were added
> 2002-01-11.

Ah. No problem. Have downloaded the 2002-02-04 snapshot and will try again
this evening.
> I have no idea what "_mm_cmpgt_epi8" is though.  It's not in my
> documentation.  Is that just a typo for "_mm_cmpgt_pi8"?
No, it's the extended version that works on V16QIs stored in XMM
registers, rather than V8QIs stored in MMX ones. See page C-17
of the P4 manual

There's a whole collection of these extended-MMX instructions --
basically a complete duplicate of MMX; as far as I can tell from
a cursory reading of, they aren't entirely implemented,
which is a pity since they let you do MMXish things in double-
width and without destroying the contents of the x87 registers.

I tried using one with asm() commands, but this caused an ICE;
I'll try again with a newer snapshot this evening, and post a bug
report if the compiler still segfaults.


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