Re: [Pixman] xmmintrin.h (was [PATCH 2/4] Disable MMX when incompatible clang is being used.)

2012-04-11 Thread Jeremy Huddleston

On Apr 11, 2012, at 11:33 AM, Matt Turner matts...@gmail.com wrote:
 I feel like we're going in circles and I don't understand what problem
 with the previously attached patch is.

I don't either, which is why I ack'd it.

___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


Re: [Pixman] xmmintrin.h (was [PATCH 2/4] Disable MMX when incompatible clang is being used.)

2012-04-10 Thread Matt Turner
On Tue, Apr 10, 2012 at 1:50 AM, Jeremy Huddleston
jerem...@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:
 http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120319/055254.html


 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.

Matt


p.patch
Description: Binary data
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman