Page 1 of 1

gcc 4?

Posted: Tue Apr 05, 2005 11:16 am
by J.F.
I was checking out Fedora Core 4 test 1 the other day. It comes with gcc 4.0 standard. Is any work toward gcc 4 for PS2 going on? It seems to have stopped at 3.2.2.

By the way, the current dev branch of gcc is 4.1.

Posted: Tue Apr 05, 2005 12:33 pm
by Neil Stevens
What value does gcc 4 bring?

Does it represent as much of a slowdown vs gcc 3 as gcc 3 did vs 2.95?

Posted: Tue Apr 05, 2005 1:14 pm
by ooPo
Slower compiles for faster code? Yeah, that sucks.

Posted: Tue Apr 05, 2005 1:57 pm
by J.F.
You can find the info about gcc 4 here:
http://gcc.gnu.org/gcc-4.0/changes.html

Posted: Tue Apr 05, 2005 2:15 pm
by Drakonite
I guess gcc 3.2.3 or 3.3 or whatever the number was has a new mips core that should give a lot better results, however it also means our patches would no longer work. In other words, it'd be a lot of work to get it working.

As far as I'm concerned, gcc 4 is still too much of an unknown to worry about it for now. We spend too much time on tools and not enough on better projects anyways ;)

Posted: Tue Apr 05, 2005 2:18 pm
by Neil Stevens
ooPo wrote:Slower compiles for faster code? Yeah, that sucks.
During development, yeah, it's horrible. Slowdowns for optimized release code are fine, but not for debug versions.

Edit: Looks like it's actually faster, though, fortunately:
When compiling without optimizations (-O0), the C++ frontend is much faster than in any previous versions of GCC. Independent testers have measured speed-ups up to 25% in real-world production code, compared to the 3.4 family (which was already the fastest version to date). Upgrading from older versions might show even bigger improvements.
It's about time.

Posted: Tue Apr 05, 2005 2:54 pm
by mrbrown
bd started work on porting the 3.2.3 patches to 4.x. Alas, it seems he's too busy bringing jihad to PSP infidels to respond in this thread :P.

How far did you get bd?

Posted: Tue Apr 05, 2005 5:26 pm
by blackdroid
I came quite far, new datatypes, mmi and cop2 was okish, but and this is a reason for seppuku, cause any coder knows the value of backing up his/hers work, yet in a crititcal moment I failed to comply to the tradition set before us by the great masters of this universe, and all the stances and techniques are now lost.

Atm I have only downloaded the sources, but I intend to start again. doing it over cvs would be a good start I reckon.

Posted: Tue Apr 05, 2005 6:16 pm
by blackdroid
Neil Stevens wrote:Looks like it's actually faster, though, fortunately:
When compiling without optimizations (-O0), the C++ frontend is much faster than in any previous versions of GCC. Independent testers have measured speed-ups up to 25% in real-world production code, compared to the 3.4 family (which was already the fastest version to date). Upgrading from older versions might show even bigger improvements.
3.4 generated alot better code than 3.2.2 and I saw some major possibilities with the DFA engine, 4.x has taken it all to a new level, so yes alot better code is indeed possible, and for sure reason enough to bother about 4.x, it will take some time but its interesting work :)

Posted: Wed Apr 06, 2005 5:27 am
by J.F.
blackdroid wrote:I came quite far, new datatypes, mmi and cop2 was okish, but and this is a reason for seppuku, cause any coder knows the value of backing up his/hers work, yet in a crititcal moment I failed to comply to the tradition set before us by the great masters of this universe, and all the stances and techniques are now lost.

Atm I have only downloaded the sources, but I intend to start again. doing it over cvs would be a good start I reckon.
I've done that before. Did that three times on one project. The fourth time through, it goes much faster and you're a lot more careful about saving for some weird reason. ;) :-D

Posted: Tue Nov 15, 2005 12:08 am
by evilo
hi all,

any news on GCC 4.0 for the PS2 ? I know that most of the poeple don't care anymore.. but others yes :)

can we help with the porting or something ?

thx.

Posted: Tue Sep 26, 2006 8:36 pm
by Ixar
Hello !

I am new over there, and I may help retrofitting gcc 3.2 stuff into the new 4.0 version. If you have already done some work, I can try to complete it as far as I can.

Regards,
Ixar

PS: I have already read the gcc 3.2 patches. And a lot of messages on this forum. If you have any pointer I should refer to, don't hesitate.

Posted: Tue Sep 26, 2006 10:04 pm
by evilo
SVN (dunno if you are aware of it), for the last patches release :
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0

then Oopo, the toolchain master !

It would be really great if you could update the toolchain to GCC 4.0 !

Posted: Tue Sep 26, 2006 10:41 pm
by Ixar
Yes I already had a look at the SVN files. I have read most of the patches to understand the goal of the patches.

However I need to read more documentation (I am still reading) to understand how to implement properly the code into gcc4.

I will do a summary of the different things that needs to be patched, and were I will do the patch to make sure I don't forget anything, and that I have clearly understood.

Posted: Tue Sep 26, 2006 11:50 pm
by Ixar
According to the patch comments, it seems that their is some differences between PS2 Linux kit toolchain and the homebrew ps2dev toolchain.

I need more information on that. Is it related to the RTE ?

For my own test, I have ps2 linux kit dvd. (Just bought yesterday).

If something can be done to manage differences between RTE/non-RTE compilation, I may do it properly if I have the information.

Posted: Thu Sep 28, 2006 4:27 am
by Ixar
I have studied the binutils part of the toolchain.
I will implement the r5900 starting from mips r1000 as it's the only way to do it properly even if it's more similar to the r3000. Since we can't disable instruction properly from the r3000... I am relying on binutils 1.14 patches for that part of the work. It should be pretty fast since it's almost good in the patch.

gcc stuff seems more tricky. But I will see that when binutils is ready.