Bug 837964 - support for iwMMXt in gcc
Summary: support for iwMMXt in gcc
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 18
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-07-05 22:59 UTC by Peter Robinson
Modified: 2012-09-19 21:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-09-19 21:06:56 UTC
Type: Bug

Attachments (Terms of Use)
iwmmxt patch for gcc-4.7.1 (201.31 KB, patch)
2012-08-17 20:29 UTC, Daniel Drake
no flags Details | Diff

Description Peter Robinson 2012-07-05 22:59:23 UTC
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



Comment 1 Brendan Conoboy 2012-08-15 22:47:32 UTC
Are these patches in the FSF 4.7 branch?  If so it'd be great to pull them in.

Comment 2 Daniel Drake 2012-08-17 00:04:10 UTC
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.

Comment 3 Daniel Drake 2012-08-17 20:29:37 UTC
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.

Comment 4 Daniel Drake 2012-08-17 20:32:09 UTC
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.

Comment 5 Jakub Jelinek 2012-08-20 11:02:00 UTC
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.

Comment 6 Enrico Scholz 2012-08-29 17:43:41 UTC
fwiw, iwmmxt is broken on kernel side (last tested on 3.0 or so)


Comment 7 Daniel Drake 2012-09-19 21:06:56 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.