Page 1 of 1
What architecture does PSPSDK target?
Posted: Thu May 10, 2012 1:25 am
by Anakclusmos
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
Re: What architecture does PSPSDK target?
Posted: Thu May 10, 2012 10:17 am
by WinterMute
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.
Re: What architecture does PSPSDK target?
Posted: Mon May 14, 2012 5:04 am
by Anakclusmos
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.
Re: What architecture does PSPSDK target?
Posted: Wed May 16, 2012 7:04 am
by Anakclusmos
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?
Re: What architecture does PSPSDK target?
Posted: Wed May 16, 2012 8:01 am
by mtheall
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?
Re: What architecture does PSPSDK target?
Posted: Wed May 16, 2012 9:25 am
by WinterMute
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?
Re: What architecture does PSPSDK target?
Posted: Thu May 17, 2012 2:33 am
by Anakclusmos
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.