mmx: Use Loongson pinsrh instruction in pack_565
authorMatt Turner <mattst88@gmail.com>
Tue, 17 Apr 2012 15:28:33 +0000 (11:28 -0400)
committerMatt Turner <mattst88@gmail.com>
Fri, 27 Apr 2012 17:41:47 +0000 (13:41 -0400)
commitfacceb4a1fbba476ad98e76d15868bf7eecd3a30
treef545a7d58348f6cfaa6164e8af705cf6eaddc6c9
parent6d29b7d7557ccb657054e867f4e27f4aa89cb25e
mmx: Use Loongson pinsrh instruction in pack_565

The pinsrh instruction is analogous to MMX EXT's pinsrw, except like
other Loongson vector instructions it cannot access the general purpose
registers. In the cases of other Loongson vector instructions, this is a
headache, but it is actually a good thing here. Since the instruction is
different from MMX, I've named the intrinsic loongson_insert_pi16.

 text data bss dec  hex filename
25976 1952   0   27928 6d18 .libs/libpixman_loongson_mmi_la-pixman-mmx.o
25336 1952   0   27288 6a98 .libs/libpixman_loongson_mmi_la-pixman-mmx.o

-and: 181
+and: 147
-dsll: 143
+dsll: 95
-dsrl: 87
+dsrl: 135
-ldc1: 523
+ldc1: 462
-lw: 767
+lw: 721
+pinsrh: 35
pixman/loongson-mmintrin.h
pixman/pixman-mmx.c