-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add pseudoinstructions #6
Comments
Hi @ThinkOpenly, I wanted to know how this can be done. Is this about creating like a |
I completely missed this comment until now. Apologies. It would be nice to have the pseudoinstructions close to where the actual instructions are defined. So, I'm thinking in the same file as the respective instruction. Implementation is an open question. Off the top of my head, I can see another
[Edit]: Thinking a bit more, these strings should probably make use of the conventions of the
Unfortunately, there are a lot of odd cases where the mapping from instruction to pseudoinstruction is not straightforward (from RISC-V Unprivileged ISA V20191213, table 25.2):
The lack of a 1:1 mapping from instruction to pseudoinstruction makes for another question: to which instruction should the pseudoinstruction be associated? Maybe the association isn't terribly important, and the pseudoinstructions should just go where they best match functionally. |
Sail doesn't support string <-> string mappings.
I may have found a decent approach. Using an example from the (relatively new) RISC-V Instruction Set Manual Volume I:
The basic "4 stanzas" are necessary and reasonably straightforward, and they redirect to the base instruction's implementation where appropriate:
I also thought adding another
Without this, we'd need to deconstruct whatever is in the |
No description provided.
The text was updated successfully, but these errors were encountered: