[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] transform module not MMX
Lenard Lindstrom wrote:
The assembler code in the transform module is not MMX as advertised.
It contains at least one SSE instruction: PSHUFW .
This is a patch for SVN transform.c that removes the offensive SSE
instructions when the macro NO_SSE is defined.
--
Lenard Lindstrom
<len-l@xxxxxxxxx>
31a32,42
> /* mmx/sse assembly sequence to dumplicate the first word in an mmx register. */
> #if defined(NO_SSE)
> #define PSHUFW_0(mmxregno) \
> " punpcklwd %%mm" #mmxregno ", %%mm" #mmxregno ";" \
> " punpckldq %%mm" #mmxregno ", %%mm" #mmxregno ";"
> #else
> #define PSHUFW_O(mmxregno) \
> " pshufw $0, %%mm" #mmxregno ", %%mm" #mmxregno ";"
> #endif
>
>
1026c1037
< " pshufw $0, %%mm7, %%mm7; "
---
> PSHUFW_0(7)
1043c1054
< " pshufw $0, %%mm2, %%mm2; "
---
> PSHUFW_0(2)
1077c1088
< " pshufw $0, %%mm7, %%mm7; "
---
> PSHUFW_0(7)
1094c1105
< " pshufw $0, %%mm2, %%mm2; "
---
> PSHUFW_0(2)
1210c1221
< " pshufw $0, %%mm7, %%mm7; "
---
> PSHUFW_0(7)
1232c1243
< " pshufw $0, %%mm1, %%mm1; "
---
> PSHUFW_0(1)
1270c1281
< " pshufw $0, %%mm7, %%mm7; "
---
> PSHUFW_0(7)
1292c1303
< " pshufw $0, %%mm1, %%mm1; "
---
> PSHUFW_0(1)
1535,1536c1546,1547
< " pshufw $0, %%mm1, %%mm1; "
< " pshufw $0, %%mm2, %%mm2; "
---
> PSHUFW_0(1)
> PSHUFW_0(2)
1564,1565c1575,1576
< " pshufw $0, %%mm1, %%mm1; "
< " pshufw $0, %%mm2, %%mm2; "
---
> PSHUFW_0(1)
> PSHUFW_0(2)