[Pixman] Pixman on iOS

Luca Barbato lu_zero at gentoo.org
Sun Mar 6 04:55:11 PST 2011


On 03/06/2011 11:27 AM, Siarhei Siamashka wrote:
> On Sun, Mar 6, 2011 at 5:28 AM, cu <cairouser at yahoo.com> wrote:
>> I am starting to look (very carefully) into building pixman and, one day
>> may be, cairo on iphone/ipad/iOS.
>>
>> So far I've got to the point where I can configure and build pixman for
>> a single arm architecture. So far so good.
> 
>> However, I seem to be unable to enable NEON optimizations. Presumably,
>> iPhone/iPad armv7 does have those.
>>
>> I wonder if the issue is specific set of compiler directives used to
>> access NEON operations? Any help or insight would be appreciated.
> 
> In order to compile NEON assembly optimizations, ideally one would
> need GAS compatible assembler (fully supporting 'modern' features like
> macros) which can produce Mach-O object files. I'm not aware of the
> latest news on this front and my information may be a bit outdated.
> But from what I read, apparently Apple forked an ancient version of
> binutils ages ago and has a very primitive assembler. And on the other
> hand, upstream GNU binutils do not support Mach-O yet. The popular
> solution seems to be to use intermediate preprocessors written in
> scripting languages on assembly source files to produce something that
> can be digested by the assembler from iPhone SDK.

That one helps a lot:

https://github.com/yuvi/gas-preprocessor


> After NEON assembly can be compiled, pixman runtime CPU detection
> needs to be tweaked to detect NEON and enable it on iPhone. And
> finally, somebody needs to check whether iPhone ABI is compatible with
> what is used by Linux and Android (ARM EABI) because this can be
> potentially a source of really bad runtime bugs. Just running tests
> from pixman test suite to see whether they pass or fail may be a good
> start.

For starter I'd just force-enable/disable depending on the target build.

> That said, I neither have any Apple hardware required to do iPhone
> development, nor do I feel that it would be the right thing for me to
> work on this issue considering many factors. Surely it would have been
> better for everyone if Apple tried to be more compatible with Linux.
> But as it does not seem to be the case, somebody has to do some work
> to make sure that pixman NEON optimizations work there.

I have the needed hardware so if enough people find that part
interesting I could give a try.

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero



More information about the Pixman mailing list