summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-04-27 14:12:56 -0400
committerMatt Turner <mattst88@gmail.com>2012-04-27 16:39:13 -0400
commit2d431b53d3cdbf1997e2d3b8e17408c12220c3a1 (patch)
tree6bce5b393dbf8c2017a2d46d2e0d6c861c0a788f
parent2ddd1c498b723e8e48a38eef01d5befba30b5259 (diff)
mmx: Use wpackhus in src_x888_0565 on iwMMXt
iwMMXt which has an unsigned saturation pack instruction, while MMX/EXT and Loongson don't. ARM/iwMMXt: src_8888_0565 = L1: 110.38 L2: 82.33 M: 40.92 ( 73.22%) HT: 35.63 VT: 32.22 R: 30.07 RT: 18.40 ( 132Kops/s) src_8888_0565 = L1: 117.91 L2: 83.05 M: 41.52 ( 75.58%) HT: 37.63 VT: 35.40 R: 29.37 RT: 19.39 ( 134Kops/s)
-rw-r--r--pixman/pixman-mmx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 7fe19d53..b14201a4 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -589,9 +589,13 @@ pack_4xpacked565 (__m64 a, __m64 b)
t1 = _mm_or_si64 (t1, g1);
t0 = shift(t0, -5);
+#ifdef USE_ARM_IWMMXT
+ t1 = shift(t1, -5);
+ return _mm_packs_pu32 (t0, t1);
+#else
t1 = shift(t1, -5 + 16);
-
return _mm_shuffle_pi16 (_mm_or_si64 (t0, t1), _MM_SHUFFLE (3, 1, 2, 0));
+#endif
}
#ifndef _MSC_VER