-
Notifications
You must be signed in to change notification settings - Fork 32
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 initial support for Sail snippets #498
Conversation
That would definitely be nice but I don't think it should block this PR.
What is the encoding issue? I would hope having it all as utf-8 should be fine.
We could just have function calls be hyperlinks and include the helpers in an appendix, similar to Arm documentation. I don't think we need to restructure the sail model. Inlining for the documentation would be quite neat but again that can be an incremental improvement. Thanks for working on this, looks great! I think we should just add the execute clauses for all instructions and then do the incremental improvements afterwards. |
I agree.
Ruby loads files as ASCII by default. Easy to fix but I don't think we want to wait for a new release or asciidoctor-sail and for the docker image to get updated. I will just remove all the non-ascii characters from the Sail code I think.
Sounds good. I am off for Christmas now but I will add all the other clauses in the new year. 🎄 |
are there many non-ascii characters? and I guess you'd like to keep this one open until you've added all the other SAIL snippets before merging? |
No I think it's just one or two backticks.
Yep, will do. |
This updates the Makefile to download `riscv_RV64.json` and then add a couple of example Sail snippets to the document. There are some caveats: * No syntax highlighting or hyperlinking in the code. Alasdair demonstrated this recently but I don't know if he pushed the feature to asciidoctor-sail (or maybe the version in the Docker image is too old). * The Sail code is not really written with inclusion in documentation in mind. For example the scaddr code basically calls another function which you can't see in the docs, so it's kind of useless currently.
75d9363
to
5f1bedf
Compare
Ok I've made a new release with the ASCII issue fixed, and updated the Makefile so it doesn't need I also added a load of snippets into the document. I didn't do any of the memory ones yet - probably needs a bit more thought about what to include. I think this is ready to go anyway. After this is landed we should try and get the newer version with syntax highlighting, hyperlinking, etc. Here's the HTML it outputs. Search for |
Just looked over the rendered HTML and this looks good. A few ones I noticed that aren't there yet and have a real sail implementation are CMV, CRAM, JALR_capmode, JAL_capmode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still LGTM, futher improvements can always be made in follow-up PRs.
Added, thanks! |
This updates the Makefile to download
riscv_RV64.json
and then add a couple of example Sail snippets to the document.There are some caveats:
There are a few ways I can think of to fix the last point.
execute
clauses that switch on a union, but I think we could also do things like inlining functions.