gcc 4?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

gcc 4?

Post 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.
User avatar
Neil Stevens
Posts: 79
Joined: Thu Jan 27, 2005 2:22 pm
Location: California
Contact:

Post 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?
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Slower compiles for faster code? Yeah, that sucks.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

You can find the info about gcc 4 here:
http://gcc.gnu.org/gcc-4.0/changes.html
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post 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 ;)
Shoot Pixels Not People!
Makeshift Development
User avatar
Neil Stevens
Posts: 79
Joined: Thu Jan 27, 2005 2:22 pm
Location: California
Contact:

Post 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.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post 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?
"He was warned..."
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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.
Kung VU
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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 :)
Kung VU
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post 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
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post 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.
Ixar
Posts: 11
Joined: Tue Sep 26, 2006 8:23 pm

Post 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.
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post 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 !
Ixar
Posts: 11
Joined: Tue Sep 26, 2006 8:23 pm

Post 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.
Ixar
Posts: 11
Joined: Tue Sep 26, 2006 8:23 pm

Post 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.
Ixar
Posts: 11
Joined: Tue Sep 26, 2006 8:23 pm

Post 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.
Post Reply