-
Notifications
You must be signed in to change notification settings - Fork 56
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
Make-reference-arguments also applies to #swap #818
Conversation
let sig := [:: sig; sig ] in | ||
Let: (prologue, es) := make_prologue ii X 0 sig es in | ||
Let: (xs, epilogue) := make_epilogue ii X sig xs in | ||
ok (prologue ++ MkI ii (Copn xs tg (Opseudo_op (pseudo_operator.Oswap ty)) es) :: epilogue) |
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.
Can we add a code like this
let tg := if Nat.eqb (size prologue) 2 &&
Nat.eqb (size epilogue) 2 then AT_none else tg in
(* I don't know why but I have a syntax error if I use == instead of Nat.eqb *)
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.
The idea is that it is clearly a case where we compute address to swap them, but where the swap instruction will be never used.
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.
Done.
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.
Did you understand the syntax error ?
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.
No. Coq notations dark magic.
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.
We do not include all_ssreflect
so you need to import eqType
and probably ssrnat
to be able to use ==
here.
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.
Indeed. Thanks. Fixed.
Just rebased to address merge conflicts in the changelog. |
Fixes #815