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

Fix Arm outputs for right shift operations #144

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

DrXiao
Copy link
Collaborator

@DrXiao DrXiao commented Aug 3, 2024

As the discussion in the pull request (#126) mentioned, shecc generates logical right shift instructions for right shift operations on Arm targets currently. However, the most famous compilers such as GCC or Clang generate arithmetic right shift instructions for the operations.

Therefore, this pull request modifies the Arm backend so that the behavior of right shift operations is consistent with GCC and Clang.

Let shecc generate arithmetic shift right instructions for
right shift operations instead of using logical shift right
instructions.

Currently, the behavior of right shift operations is consistent
with GCC and Clang.
@jserv jserv requested a review from vacantron August 3, 2024 14:38
@jserv jserv merged commit 6615b6c into sysprog21:master Aug 3, 2024
4 checks passed
@jserv
Copy link
Collaborator

jserv commented Aug 3, 2024

Thank @DrXiao for contributing!

@DrXiao DrXiao deleted the fix-arm-sra branch August 3, 2024 15:37
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

Successfully merging this pull request may close these issues.

3 participants