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

OCaml backend broken with > 246 union members #165

Closed
jrtc27 opened this issue Feb 10, 2022 · 4 comments
Closed

OCaml backend broken with > 246 union members #165

jrtc27 opened this issue Feb 10, 2022 · 4 comments

Comments

@jrtc27
Copy link
Contributor

jrtc27 commented Feb 10, 2022

In the transition from Sail 1 to 2, 89f9c0e has been lost, and the RISC-V model is close to the limit for the number of non-constant constructors generated by the OCaml backend (for the ast union representing decoded instructions). This is causing issues for the P and V extension development; see riscv/sail-riscv#132 (comment) and riscv/sail-riscv#138 (comment).

@Alasdair
Copy link
Collaborator

Should be fixed. I used polymorphic variants like in the commit you linked.

I also tried an alternative approach where I used the last constructor as an overflow constructor, and then generated extra variant types for the overflow cases but it seemed more complex for little benefit, assuming there are no actual issues with using polymorphic variants for this.

@martinberger
Copy link

@Alasdair is this fix already being picked up by opam?

@jrtc27
Copy link
Contributor Author

jrtc27 commented Feb 12, 2022

You will need to opam pin a git clone until a new version is released

@martinberger
Copy link

You will need to opam pin a git clone

OK, this is not something we should do with the GitHub actions for the RISCV-Sail model.

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

3 participants