[Pixman] xmmintrin.h (was [PATCH 2/4] Disable MMX when incompatible clang is being used.)
mattst88 at gmail.com
Tue Apr 10 12:30:12 PDT 2012
On Tue, Apr 10, 2012 at 1:50 AM, Jeremy Huddleston
<jeremyhu at freedesktop.org> wrote:
>>>>>> Newer clangs support the "K" constraint? Fixed in response to its use
>>>>>> in pixman? :)
>> And to close the loop on this, the fix has landed in clang trunk and will be in 3.1:
> And the other half of the issue seems to be a bug in pixman (at least that's what I am told):
>> FWIW the problem happening here with inlining is that at -O0 the constant isn't being propagated through the inlining and so we have the 'K' constant error that you see.
> IMO, the source of this problem is that pixman isn't using clang's xmmintrin.h, which defines _mm_shuffle_pi16 for exactly this reason. They should fix that.
Sigh. The reason we're not just plainly using xmmintrin.h is that it
requires SSE. The MMX extension instructions we are using in
pixman-mmx.c are available in SSE and Extended 3DNow. If you compile
with -msse and include xmmintrin.h, you'll get lots of SSE
instructions that aren't in 3DNow.
Try the attached patch. It's how gcc's xmmintrin.h handles it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 609 bytes
Desc: not available
More information about the Pixman