-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIPS] Support for the mips3 subset of instructions #18632
Comments
Hi Brian, The MIPS backend doesn't support MIPS-I through to MIPS-V at the moment. MIPS-I and MIPS-II had experimental support at one point but this was removed in 2011 when the MIPS backend moved from 'experimental' to 'production quality'. I can't offer to help with the implementation since our focus is on the more recent ISA's, but I'm happy to accept patches that add support for the older ISA's. I'm not particularly familiar with MIPS-III but you'll need to add it to both clang and llvm. If you grep the clang source for one of the existing architectures (e.g. 'mips32r2') you should get a good idea of the bit's you'd need to change there. On the LLVM side, I expect the MIPS64 target would be a good starting point and it is likely to be a case of adding a target feature (perhaps NotMIPS3) and annotating the unavailable instructions with it. http://llvm.org/docs/WritingAnLLVMBackend.html should be quite useful if you haven't already read it. |
I see that there is an implementation of options for MIPS I - V but are listed as highly experimental. I do not have way to test this. Is this still actual? Should this bug be closed? |
MIPS3 implementation is still in "experimental" status. We are interesting to get MIPS3 related bug/feature reports with more precise description of problems and with reproduction scripts. |
Simon, as of our next release (6.5) we are now shipping Clang 7.0.1 on mips64/mips64el; though it's not the default system compiler (yet). We just recently upgraded from 6.0.0 to 7.0.1. Clang was initially enabled on mips64 with 6.0.0. Some initial work has been done towards building OpenBSD/mips64 with Clang 6.0.0. We'll see how things go with 7.0.1. |
Extended Description
Running clang-3.4 rc2 on OpenBSD/mips64el: OpenBSD's MIPS platforms use the mips3 ISA in order to support older SGI and Loongson 2F machines, which don't have full support for the MIPS64 instruction set.
While clang will build and will run, one can only compile code where clang doesn't use instructions unsupported by mips3 processors; in practice, this is all but the most basic of programs.
Otherwise, you get lines like this:
/tmp/dip-74cd45.s: Assember messages:
/tmp/dip-74cd45.s:2092: Error: opcode not supported on this processor: mips3 (mips3) `movt $5,$4,$fcc0'
Is there currently a way to use a reduced instruction set? If not, where should one look to start implementing it?
The text was updated successfully, but these errors were encountered: