This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Documentation of vector intrinsics / SSE2
- From: Ian Lance Taylor <ian at airs dot com>
- To: Martin Reinecke <martin at MPA-Garching dot MPG dot DE>
- Cc: gcc at gcc dot gnu dot org
- Date: 06 May 2006 15:27:35 -0700
- Subject: Re: Documentation of vector intrinsics / SSE2
- References: <445B367C.4020604@mpa-garching.mpg.de>
Martin Reinecke <martin@MPA-Garching.MPG.DE> writes:
> I'm trying to learn about GCC's support for vector arithmetic and found
> the section "Using vector instructions through built-in functions", which
> answers a lot of questions, but unfortunately does not address things
> like gathering scalar values into a vector type or reading scalars
> out of such a variable, which I think is quite important for everyone
> who wants to use this nice extension.
At present it has to be done through a union type: a union of the
vector type and an array of the appropriate length and element type.
> More X86-specific, the section "X86 Built-in Functions" documents
> builtins for MMX, 3DNow, SSE, SSE3, but appears to omit the vector
> intrinsics for SSE2 like, e.g., __builtin_ia32_sqrtpd().
The x86 built-in functions is now completely out of date. The
preferred approach now is to use the Intel documented intrinsics
functions declared in mmintrin.h and friends.
Ian