gcc-4.3.0 patch for test

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

gcc-4.3.0 patch for test

Post by gauri »

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
Last edited by gauri on Tue Mar 25, 2008 9:06 am, edited 1 time in total.
Freelance game industry veteran. 8]
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

I cannot find in this patch where you add TARGET_ALLEGREX for ISA_HAS_ROR.
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

Post by gauri »

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

Code: Select all

@@ -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]
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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.
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

Post by gauri »

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]
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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 ?
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

Post by gauri »

I think 4.3.0 will be better. :-)
Freelance game industry veteran. 8]
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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

Code: Select all

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
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

Post by gauri »

sure, take it from http poly-glu.eu/temp/gcc-4.3.0-PSP.patch
Freelance game industry veteran. 8]
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

that's better !

patches in code tag don't work.
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

Post by gauri »

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]
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

it works fine for me, although my code is hardly an extensive test :)
gauri
Posts: 35
Joined: Sun Jan 20, 2008 11:17 pm
Location: Belarus

Post by gauri »

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]
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

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