Clang for the PlayStation 2

I have a GitHub page containing my patches and a rough writeup of the issues I’ve encountered at

There’s still a lot of work to be done before I’m going to consider upstreaming the backend, if at all, but I’ll do my best to get bugfixes sorted quickly.

So, I’ve been busy with life over the past month, but that has given me chance to reflect on what this should look like.

I would like to reach parity (plus or minus the FPU) with GCC 3.2.3, and hopefully be stable enough to run Rust on the PS2. By having a better compiler we can squeeze more out of the chip; in particular I’m curious about the second pipeline of the EE; despite stating that the chip is 2-wide superscalar, the docs are unclear on whether this is automatic or manual. Since the chip has dedicated instructions for running on the second pipeline, I’m inclined to think manual.

There is also both MMI (which is internal to the chip) and VU0 macro mode (which uses VU0 as COP2) as possibilities for autovectorisation, but that is a long way off.