[Pixman] [PATCH v2 1/2] mmx: Use _mm_mulhi_pu16

Søren Sandmann sandmann at cs.au.dk
Sun Feb 19 15:41:55 PST 2012

Matt Turner <mattst88 at gmail.com> writes:

> +/* We have to compile with -msse to use xmmintrin.h, but that causes SSE
> + * instructions to be generated that we don't want. Just duplicate the
> + * functions we want to use.  */
> +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> +_mm_mulhi_pu16 (__m64 __A, __m64 __B)
> +{
> +  return (__m64) __builtin_ia32_pmulhuw ((__v4hi)__A, (__v4hi)__B);
> +}

Shouldn't this be bracketed by #ifdef USE_X86_MMX? Or does
__builtin_ia32_pmulhuw() work on iwMMX too?

Also, in principle __builtin_ia32_pmulhuw() should be checked
for in the MMX section of configure.ac; it might not be available on
Solaris compilers for example.

Similar things applies to the pshufw patch.


More information about the Pixman mailing list