[clang] [llvm] [Mips] Add r5900 (PlayStation 2 Emotion Engine) CPU support (PR #176666)
Rick Gaiser via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 23 00:53:07 PST 2026
rickgaiser wrote:
So the ISA definition and ELF flags should stay the way it currently is (compatible with gcc), thank you for confirming:
- ELF Header: EF_MIPS_ARCH_3 | EF_MIPS_MACH_5900
- MIPS.abiflags: AFL_EXT_5900
The `-mfix-r5900` option does seem usefull then, so I added it back in. For inline assembly there is currently no fix or warning. I could add a new warning flag `-Wmips-r5900-short-loop`, only active when targeting R5900 or when `-mfix-r5900` is used? For the llvm printed assembly code `.set noreorder` is emitted for each function, so GAS should handle this correctly already (but note that it's not needed to use GAS with LLVM).
https://github.com/llvm/llvm-project/pull/176666
More information about the cfe-commits
mailing list