[Pixman] Linux MIPS DSP-ASE Instructions usage

Satendra... satendra.pratap at gmail.com
Sun Dec 12 23:12:06 PST 2010

Hi ,

We are trying to use the MIPS-DSP-ASE instructions to extract bits
from a bit-stream.
The version is MIPS-32 rev 1. (Little Endian)
The problem is that, the extp and its variants extract the bits from
left-most i.e. MSB.
So each time we have to load to the accumulator, we have to reverse
the stream and then load,
and extract and then reverse. This in-turn is reducing the perfomance
rather than increasing it.

For instance,
Stream -> 111011011
extract 3-bits in C code => 011 (x = (unsigned) stream& ((1<<3 )-1) )
Load this stream to accumulator and extract 3 bits => 111

Now reverse the stream and load to accumulator => 110110111
extract 3 bits from accumulator => 110
Now reverse the extracted bits =>011

So we have to reverse the stream before loading to the accumulator and
reverse it again after extracting from
accumulator which reduces the performance drastically.
we guess the MIPS engineers would definitely have thought about it but
we are unable to figure out a way to use these
instructions without reversing the bit-streams.

Please can you let us know a way to use these instructions without reversing.

Here is the link to the patent:-


More information about the Pixman mailing list