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

Specify misa.M behaviour with Zmmul #1711

Open
Timmmm opened this issue Nov 5, 2024 · 3 comments
Open

Specify misa.M behaviour with Zmmul #1711

Timmmm opened this issue Nov 5, 2024 · 3 comments

Comments

@Timmmm
Copy link
Contributor

Timmmm commented Nov 5, 2024

From this comment:

misa spec requires that if M is set, then M is available. If only Zmmul is present misa.M should be clear. If misa.M is writable and M is cleared, the specs say that the hart behaves as if M not present, where behavior includes the opcodes being "reserved". Whether Zmmul is still usable when misa.M is clear is implementation-defined; misa allows the behaviors to be "reserved" in this case - so Zmmul if still available, it acts as a standard extension. This I believe is the only way to have a consistent view of misa behavior matching the ratified specifications.

To avoid spec-by-github-issue please can we add that information to the actual spec? It is not obvious.

I think it is correct though since it matches the B extension and its sub-extensions. The C extension/sub-extensions work differently.

Ideally a whole section would be added to misa explaining how the sub-extensions are supposed to work for M, B, C, etc.

@allenjbaum
Copy link

allenjbaum commented Nov 6, 2024 via email

@Timmmm
Copy link
Contributor Author

Timmmm commented Nov 6, 2024

To be clear when you say ops are reserved, it means they may still be implemented. If so that matches my understanding. The writability of the bit doesn't affect the meaning so I think you can simplify your table to:

misa.M Zmmul Multiply Division
1 Implied Legal Legal
0 Yes Legal Reserved (may or may not be implemented)
0 No Reserved (may or may not be implemented) Reserved (may or may not be implemented)

Does that look right?

@allenjbaum
Copy link

allenjbaum commented Nov 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants