[Pixman] [ssse3]Optimization for fetch_scanline_x8r8g8b8

Siarhei Siamashka siarhei.siamashka at gmail.com
Thu Aug 19 06:07:54 PDT 2010

On Tuesday 17 August 2010 10:52:43 Xu, Samuel wrote:
> We'd like to provide a new patch with following enhancement soon:
> 1) Add 64 bit asm code specifically for 64 bit, which will co-exist with 32
> bit version 
> 2) CPUID dynamic check in pixman-cpu.c and pixman-access.c
> 3) Makefile fixing
> 4) Stack executable fixing in both 32/64 asm files.
> 5) follow your comments to make asm code shorter

Sounds good. The way how these optimizations get hooked into 'pixman-access.c' 
may need some extra tweaks in the end (they need to be approved by Soeren 
Sandmann), but the rest of the changes seem quite reasonable to me.

I still wonder, would a common unified 32/64 bit SSSE3 assembly source be 
possible? Calling conventions are different, but the rest of code should be 
more or less the same.

> Any missing?

Also a proper copyright notice in the beginning of new files is needed.
The text of the current recommended canonical pixman license can be found here:  

> Two more questions:
> ----"Maybe the intention was good, but the end result just fails to build
> on my 64-bit Intel Atom netbook. And pixman "make check" dies with
> "Illegal instruction" on a 32-bit Intel Pentium-M laptop. So it's a clear
> indication that you did something wrong and the patch is unacceptable as
> is."
> Q1: Could you past the 64-bit ATOM build failure? Is it caused by
> ./configure to generate make file, or build error, or link error?

It's just a normal x86-64 build failure related to pixman-access-ssse3.S:

$ git clone git://anongit.freedesktop.org/pixman
$ cd pixman
$ patch -p1 < first_revision_of_ssse3_patch.diff

$ ./autogen.sh
checking whether to use SSSE3 intrinsics... yes

$ make
  CPPAS  pixman-access-ssse3.lo
pixman-access-ssse3.S: Assembler messages:
pixman-access-ssse3.S:118: Error: suffix or operands invalid for `push'
pixman-access-ssse3.S:118: Error: bad register expression
pixman-access-ssse3.S:118: Error: register save offset not a multiple of 8
pixman-access-ssse3.S:130: Error: suffix or operands invalid for `jmp'
pixman-access-ssse3.S:132: Error: suffix or operands invalid for `jmp'
pixman-access-ssse3.S:138: Error: suffix or operands invalid for `push'
pixman-access-ssse3.S:138: Error: bad register expression
pixman-access-ssse3.S:143: Error: suffix or operands invalid for `push'
pixman-access-ssse3.S:143: Error: bad register expression

> Q2:
> Could you show us how to do "make check"?

Same as above, but also run 'make check' after 'make'.

To be sure that the tests are working properly and the new code is actually 
used, you may deliberately add a bug into your new code for testing purposes 
and verify that 'make check' detects it.

It may be also convenient to configure pixman with '--disable-shared' option to 
make debugging easier.

Best regards,
Siarhei Siamashka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20100819/9f01ad40/attachment.pgp>

More information about the Pixman mailing list