Bug 837964 - support for iwMMXt in gcc
support for iwMMXt in gcc
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-07-05 18:59 EDT by Peter Robinson
Modified: 2012-09-19 17:06 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-19 17:06:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Peter Robinson 2012-07-05 18:59:23 EDT
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 18:47:32 EDT
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-16 20:04:10 EDT
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 16:29:37 EDT
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 16:32:09 EDT
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 07:02:00 EDT
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 13:43:41 EDT
fwiw, iwmmxt is broken on kernel side (last tested on 3.0 or so)

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