Replies: 2 comments 39 replies
-
|
This is a nice place to have a conversation about designs, let me kick off with a few design decision I made so we can discuss (and I can change) them before it get to the point of a PR. MMI datatypesMMI uses the 128bit GRP registers. On GCC these can be used as
Existing code (like ps2sdk) will need to change from using TI mode, to using one of the vector modes. Since it';s only used for things like pointers and data copying this will be easy to change (I already tested in a branch). MMI ABIThe calling convention is the same, but extended from 64bit to 128bit. Saving restoring on the stack is also extended to 128bit. I have many questions about this. Like:
VU0 macro modeI added the vu0 macro mode instructions optionally using the
VU0 ABII extended the n32 ABI and took the same approach as the FPU registers, which are also 32 registers. Only VF0 is different between FPU and VU0 (for vu0 it's
ACC registersThis is where the ps2 performance starts to shine. I was not able to properly implement these in GCC, somehow each approach I took I got stuck. Leaving only inline assembly for GCC to use the ACC register. PR plan for LLVM
With phase 1 and 2 LLVM support will be sort of at the same level as GCC upstream. And with phase 3 it will be sort of at the same level as the custom GCC branch @fjtrujy and I have been maintaining on ps2dev for the past years. References full feature LLVM: References full feature GCC: Reference ps2dev GCC: |
Beta Was this translation helpful? Give feedback.
-
|
Phase 1 has been merged into LLVM! Yay! So I'm moving on to phase2: basic hard FPU support (no ACC). I have the commit ready here: However before making the PR I have a few questions that would be nice to discuss now: R5900 specific instructionsThe commit currently includes r5900 specific instructions: Perhaps better to excude these extra instruction from the initial PR? As they are not absolutely needed but can lead to discussion. No double, only single precisionr5900 seems to be the first to use only single precision. IEEE 754 compatibility |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
We talk about R5900 assemblers, compilers, related tooling, file formats such as ELF, etc.
GCC has supported the R5900 for decades, and now LLVM is about to join. Review #1 (comment) and llvm/llvm-project#176666 for some starting points!
Beta Was this translation helpful? Give feedback.
All reactions