This is the mail archive of the
mailing list for the GCC project.
Re: Vector Extensions to C (SSE2 on X86)
- From: Ian Lance Taylor <iant at google dot com>
- To: Amund Fjellheim <abc at lavacat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 01 Aug 2006 06:51:27 -0700
- Subject: Re: Vector Extensions to C (SSE2 on X86)
- References: <56C189CE-4198-4453-9055-3CBB32DB953F@lavacat.com>
Amund Fjellheim <email@example.com> writes:
> GCC has some support for vector instructions through typedef'ed types
> like this:
> typedef int v4si __attribute__ ((vector_size (16)));
> Some normal C operators can be done on these and there are some
> platform specific built in functions. The X86 functions are listed at
> Functions.html#X86-Built_002din-Functions , but there are lots of
> SSE2 instructions missing. Why? I don't see how it could be so hard
> to implement
> v4si __builtin_ia32_pslld(v4si, int)
> and so on, when so many other SSE and SSE2 instructions are there.
> Also, why aren't they available for C++ programs compiled with g++?
> Will these things be fixed in future releases of gcc? Anyone know
> something about the status on this?
It is a documentation failure. gcc's current goal is to implement the
Intel intrinsic functions, providing mmintrin.h and friends:
So, to get pslld, you would use _m_pslld or _m_pslldi, etc.