Skip to content
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

Closed
llvmbot opened this issue Dec 16, 2013 · 4 comments
Closed

[MIPS] Support for the mips3 subset of instructions #18632

llvmbot opened this issue Dec 16, 2013 · 4 comments
Labels
backend:MIPS bugzilla Issues migrated from bugzilla wontfix Issue is real, but we can't or won't fix it. Not invalid

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 16, 2013

Bugzilla Link 18258
Resolution WONTFIX
Resolved on Feb 01, 2019 15:10
Version trunk
OS OpenBSD
Reporter LLVM Bugzilla Contributor
CC @atanasyan

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?

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 17, 2013

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.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Oct 17, 2018

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?

@atanasyan
Copy link
Collaborator

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.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 1, 2019

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.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
@Quuxplusone Quuxplusone added the wontfix Issue is real, but we can't or won't fix it. Not invalid label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:MIPS bugzilla Issues migrated from bugzilla wontfix Issue is real, but we can't or won't fix it. Not invalid
Projects
None yet
Development

No branches or pull requests

3 participants