What architecture does PSPSDK target?

support for the PSP toolchain
Post Reply
Anakclusmos
Posts: 19
Joined: Mon Nov 01, 2010 2:05 am

What architecture does PSPSDK target?

Post by Anakclusmos » Thu May 10, 2012 1:25 am

Does anyone know what architecture the pspsdk targets? I think it's either mips-elf or mips-eabi but I'm not sure. No, I don't want to build the psptoolchain. I want to make a 'naked' GCC compiler for PSP for experimental purposes.

If there's any patches or resources I need, it'd be great if you could link me to that as well. Thanks ahead of time :)

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: What architecture does PSPSDK target?

Post by WinterMute » Thu May 10, 2012 10:17 am

It's mipsallegrexel--psp-elf, the patchsets for binutils/gcc add instructions specific to the psp allegrex cpu, it's not a standard target provided by the FSF sources.

The patches can be found at http://devkitpro.git.sourceforge.net/gi ... sp/patches and in the psp toolchain scripts at https://github.com/pspdev/psptoolchain

What do you mean by a "naked gcc"? I'm not 100% sure but you might be able to get away with a standard mipsel-none-elf target but I can't guarantee it won't emit instructions that will crash the PSP. It's probably also worth noting that much of the newlib patching uses code that interfaces with libraries on the PSP itself so a gcc without libc etc will probably have difficulty with providing IO support.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Anakclusmos
Posts: 19
Joined: Mon Nov 01, 2010 2:05 am

Re: What architecture does PSPSDK target?

Post by Anakclusmos » Mon May 14, 2012 5:04 am

WinterMute wrote:It's mipsallegrexel--psp-elf, the patchsets for binutils/gcc add instructions specific to the psp allegrex cpu, it's not a standard target provided by the FSF sources.

The patches can be found at http://devkitpro.git.sourceforge.net/gi ... sp/patches and in the psp toolchain scripts at https://github.com/pspdev/psptoolchain

What do you mean by a "naked gcc"? I'm not 100% sure but you might be able to get away with a standard mipsel-none-elf target but I can't guarantee it won't emit instructions that will crash the PSP. It's probably also worth noting that much of the newlib patching uses code that interfaces with libraries on the PSP itself so a gcc without libc etc will probably have difficulty with providing IO support.
Thanks! By 'naked' gcc I meant without any libraries, either general or psp-specific, I plan on building a psp devkit using my own runtimes. Thanks for the heads up on newlib btw, that would've been the first slap in the face. :D

Anakclusmos
Posts: 19
Joined: Mon Nov 01, 2010 2:05 am

Re: What architecture does PSPSDK target?

Post by Anakclusmos » Wed May 16, 2012 7:04 am

I just noticed something rather odd, the pspsdk doesn't support TI emulation. That means that it targets a 32-bit machine. The PSP itself has a 64-bit processor. Hate to point it out, but someone done screwed up somewhere making this thing. Is there any plan to fix this?

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: What architecture does PSPSDK target?

Post by mtheall » Wed May 16, 2012 8:01 am

I can only find evidence that the PSP Allegrex CPU is 32-bit. Can you point to a source that says PSP has a 64-bit processor?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: What architecture does PSPSDK target?

Post by WinterMute » Wed May 16, 2012 9:25 am

PSP CPUs are based on MIPS R4000 32-bit Core, no idea how you got the idea that it's 64bit. What do you mean by TI emulation?
Help keep devkitPro toolchains free, Donate today

Personal Blog

Anakclusmos
Posts: 19
Joined: Mon Nov 01, 2010 2:05 am

Re: What architecture does PSPSDK target?

Post by Anakclusmos » Thu May 17, 2012 2:33 am

MIPS R4000 based architectures (according to official documentation) can run in 64-bit mode. TI emulation is basically an attribute used by the GCC to create 128-bit integers, however TI emulation is only supported on 64-bit architectures. Additional proof of the PSP's processor being 64-bit is within the leaked official libraries where they define 128-bit integers.

My goal here was to create my own update EBOOT for the PSP with it's own libraries (like an operating system replacement), using the official libraries as a reliable source of documentation. However, this is pretty much the first conflict I hit when building the libraries.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests