The follow two upstream patches add support for Marvell's iwMMXt to gcc 4.7, it would be great to get the patches into rawhide/f17 to improve support for the OLPC XO 1.75 and the Armada XP
Are these patches in the FSF 4.7 branch? If so it'd be great to pull them in.
Unfortunately they aren't - the patches took a long time to be reviewed and 4.7 had already been branched into fixes-only mode when they got applied.
We are hoping that Fedora would consider taking these patches (actually only one, since the other is documentation/testsuite only, not really necessary) for 4.7. I would be happy to be responsible for fixing the patch if it breaks. And it could obviously be dropped as soon as Fedora moves to 4.8, where the patch is already included.
To help ease this process I will turn the above link into a .patch, check that it applies against the current gcc shipped in Fedora, do a scratch build and test the functionality. I'll post results here when done.
Created attachment 605261 [details]
iwmmxt patch for gcc-4.7.1
Here is the patch backported/rediffed to gcc-4.7.1.
There was a trivial reject easily solved, and also I found a small issue in the upstream commit (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54306) and included the fix here too.
I did a scratch build and tested this, it seems to be working fine and provides an impressive performance increase in pixman (which already is capable of exploiting this instruction set).
Jakub, what are your thoughts here? Can we ship this backported functionality until gcc-4.8 is in Fedora? As noted in the patch I'm happy to be held responsible for it.
Just to clarify one detail: OLPC is currently developing against F18, which is the first Fedora release that includes a pixman capable of using this optimization, so there is no need to put this in F17.
I'd prefer not to backport it, the patch is really large, needed follow-ups already, and while I backport even large patches from time to time, it is always in an area of my expertise, because such selective backports create a compiler that works differently from both the FSF release and upcoming FSF release, so there is a big chance of bugs that only reproduce with the GCC 4.x-RH branch and no FSF release.
fwiw, iwmmxt is broken on kernel side (last tested on 3.0 or so)
Thanks Enrico, I will try the tests you provide to see if we can reproduce such failures.
Going back to the original patch inclusion request, we've found that there is a bug in gcc-4.7 that makes it hard to compile things with iwmmxt support enabled, and the same crash is hit with the iwmmxt2 paths patched here:
(fixed in gcc-4.8 only)
So I think Jakub is spot-on with his above comment - this is too risky. Best to wait for gcc-4.8 to be released.