The Wayback Machine - http://web.archive.org/web/20200904214841/https://github.com/google/xls/issues/79
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

Change DSL shift right behavior to match Rust #79

Open
cdleary opened this issue Aug 8, 2020 · 0 comments
Open

Change DSL shift right behavior to match Rust #79

cdleary opened this issue Aug 8, 2020 · 0 comments

Comments

@cdleary
Copy link
Collaborator

@cdleary cdleary commented Aug 8, 2020

Rust chooses shra or shrl depending on the signedness of the integer being shifted, see the footnote here: https://doc.rust-lang.org/reference/expressions/operator-expr.html#arithmetic-and-logical-binary-operators

Right now we have >> for logical and >>> for arithmetic, as a vestige from earlier times (now we try to follow Rust syntax as closely as is reasonably possible).

/cc @hmontero1205

@cdleary cdleary added the dslx label Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.