circular shift ops #189
Merged
circular shift ops #189
Conversation
|
great additions! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
What does this PR do?
LROT,RROT, with aliases<<<and>>>. Negative shift amounts are allowed, which shift the opposite direction.LSHandRSHbehavior for negative shift amounts: shifting by a negative amount is technically undefined behavior, but in practice this always returned 0. After this change negative amounts are allowed, soLSH X -2is equivalent toRSH X 2.SGNop to get the sign of a value (1, 0, or -1).Provide links to any related discussion on lines.
https://llllllll.co/t/teletype-3-feature-requests-and-discussion/16219/16
https://llllllll.co/t/bounty-teletype-circular-shift-ops/26956
How should this be manually tested?
Any background context you want to provide?
If the related Github issues aren't referenced in your commits, please link to them here.
I have,
CHANGELOG.mdmake formaton each commit