forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gcc-4.3.0 patch for test

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Sun Mar 23, 2008 8:57 am    Post subject: gcc-4.3.0 patch for test Reply with quote

well, here it is...
needs fresh gmp and mpfr built and available (for static link to gcc).

UPD: take it from http poly-glu.eu/temp/gcc-4.3.0-PSP.patch
_________________
Freelance game industry veteran. 8]


Last edited by gauri on Tue Mar 25, 2008 9:06 am; edited 1 time in total
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sun Mar 23, 2008 9:18 am    Post subject: Reply with quote

I cannot find in this patch where you add TARGET_ALLEGREX for ISA_HAS_ROR.
Back to top
View user's profile Send private message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Sun Mar 23, 2008 6:16 pm    Post subject: Reply with quote

hlide wrote:
I cannot find in this patch where you add TARGET_ALLEGREX for ISA_HAS_ROR.

it's at
Code:
@@ -823,6 +831,7 @@
               || TARGET_MIPS5400         \
               || TARGET_MIPS5500         \
               || TARGET_SR71K         \
+                                  || TARGET_ALLEGREX         \
               || TARGET_SMARTMIPS)         \
              && !TARGET_MIPS16)


...you scared me. i've just thought i really missed that and need to go through all the build process again. :-)
_________________
Freelance game industry veteran. 8]
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sun Mar 23, 2008 10:44 pm    Post subject: Reply with quote

lol ! I just looked at the patch not at the result so i couldn't see it ;P. Well, globally this patch appears good.

I guess what it lacks is vfpu now.
Back to top
View user's profile Send private message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Sun Mar 23, 2008 11:32 pm    Post subject: Reply with quote

hlide wrote:
I guess what it lacks is vfpu now.

If you mean compiler intrinsics for VFPU like that is done for, say, SSE or AltiVec, then it's a damn load of work... I'm not sure even where to start.
But that'd be very nice to have, surely.
_________________
Freelance game industry veteran. 8]
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Mon Mar 24, 2008 12:13 am    Post subject: Reply with quote

i don't think intrinsics (the biggest load of works, yes) are important. The only thing important is for gcc to be able to allocate vfpu registers in asm statements and for function arguments or results. With this minimal requirement, you can let gcc optimize through inline functions using allocation of those registers and asm statements. I already did that for psp-gcc 4.0, but i still had some troubles to mix vfpu scalar float and fpu float (i was forced to exclude one of both from arguments) and things like that.

I should probably retry it cleaner.

But I'm still not decided with which version to apply those changes : 2.1.0 or 2.3.0 ?
Back to top
View user's profile Send private message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Mon Mar 24, 2008 7:09 am    Post subject: Reply with quote

I think 4.3.0 will be better. :-)
_________________
Freelance game industry veteran. 8]
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Tue Mar 25, 2008 1:32 am    Post subject: Reply with quote

i cannot apply your patch, could you give me an url so i can download it ?

Code:
hli@hliworld /cygdrive/m/psptoolchain/build/gcc-4.3.0
$ cat ../gcc-4.3.0-PSP.patch | patch -p1
patching file config.sub
Hunk #1 FAILED at 267.
Hunk #2 FAILED at 349.
Hunk #3 FAILED at 716.
3 out of 3 hunks FAILED -- saving rejects to file config.sub.rej
patching file gcc/config/mips/allegrex.md
patching file gcc/config/mips/mips-ftypes.def
patching file gcc/config/mips/mips.c
Hunk #8 succeeded at 10634 with fuzz 1.
Hunk #9 succeeded at 10686 with fuzz 2.
patching file gcc/config/mips/mips.h
Hunk #2 succeeded at 238 with fuzz 2.
Hunk #3 FAILED at 262.
Hunk #4 succeeded at 741 with fuzz 2.
Hunk #5 FAILED at 764.
Hunk #6 FAILED at 787.
Hunk #7 FAILED at 831.
Hunk #8 FAILED at 857.
Hunk #9 FAILED at 906.
6 out of 12 hunks FAILED -- saving rejects to file gcc/config/mips/mips.h.rej
patching file gcc/config/mips/mips.md
Hunk #1 FAILED at 209.
Hunk #2 FAILED at 1719.
Hunk #3 FAILED at 1838.
Hunk #4 FAILED at 2129.
Hunk #6 FAILED at 6089.
Hunk #7 FAILED at 6119.
6 out of 8 hunks FAILED -- saving rejects to file gcc/config/mips/mips.md.rej
patching file gcc/config/mips/mips.opt
patching file gcc/config/mips/psp.h
patching file gcc/config/mips/t-allegrex
patching file gcc/config.gcc
Hunk #1 FAILED at 1818.
1 out of 1 hunk FAILED -- saving rejects to file gcc/config.gcc.rej
patching file libgcc/config.host
Hunk #1 FAILED at 458.
1 out of 1 hunk FAILED -- saving rejects to file libgcc/config.host.rej

hli@hliworld /cygdrive/m/psptoolchain/build/gcc-4.3.0
$


strangely, lines numbers don't match those of gcc-4.3.0
Back to top
View user's profile Send private message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Tue Mar 25, 2008 4:05 am    Post subject: Reply with quote

sure, take it from http poly-glu.eu/temp/gcc-4.3.0-PSP.patch
_________________
Freelance game industry veteran. 8]
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Tue Mar 25, 2008 4:26 am    Post subject: Reply with quote

that's better !

patches in code tag don't work.
Back to top
View user's profile Send private message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Tue Mar 25, 2008 9:22 am    Post subject: Reply with quote

Fixed top message for truth. © :-)

UPD: I experience major slowdown when working with this version... For some reason it chews the disk for a few seconds and only then does the work... And that for each file being compiled. I'm not sure whether this is my cygwin installation's broken or the compiler is insane.
What about you?
_________________
Freelance game industry veteran. 8]
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Tue Mar 25, 2008 11:26 am    Post subject: Reply with quote

right now, i'm building the second stage of gcc.

i'll tell you when I have time to make a try on a project
Back to top
View user's profile Send private message
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Tue Mar 25, 2008 4:19 pm    Post subject: Reply with quote

it works fine for me, although my code is hardly an extensive test :)
Back to top
View user's profile Send private message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Tue Mar 25, 2008 4:21 pm    Post subject: Reply with quote

jsharrad wrote:
it works fine for me, although my code is hardly an extensive test :)

getting the code to compile and link correctly is already a win to me. :-)
but indeed, we need some kind of a testbench. i'm not sure whether built-in testsuite will do since it's a cross-compiler we build.
_________________
Freelance game industry veteran. 8]
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Thu Apr 24, 2008 1:09 am    Post subject: Reply with quote

Hi guys I've just posted a win32 build of your patch and gdb 6.8 on my sourceforge port project:

http://minpspw.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group