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]

Re: Documentation of vector intrinsics / SSE2


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


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