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

Matt Turner mattst88 at gmail.com
Sun Feb 19 15:44:17 PST 2012


On Sun, Feb 19, 2012 at 6:41 PM, Søren Sandmann <sandmann at cs.au.dk> wrote:
> 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?

Yes, I was too quick with this.

> 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.

Okay, agreed.


More information about the Pixman mailing list