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

Enhance shift value and types of shift instructions. #2638

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

Rot127
Copy link
Collaborator

@Rot127 Rot127 commented Feb 26, 2025

Shifts via registers now save the register id in cs_arch64_op.shift.value and set the shift type accordingly.

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

This streamlines the whole shift operands for AArch64.

It fixes the bug of #2631 (shift immediate was not saved in shift.value).
Additionally, if a register is used for shifting, it saves this register in shift.value.
This is the same behavior as the ARM module have. And is in general more convenient.

Test plan

Added tests for all common shift instructions and their variants.

Closing issues

closes #2631

@github-actions github-actions bot added the AArch64 Arch label Feb 26, 2025
Shifts via registers now save the register id in cs_arch64_op.shift.value
and set the shift type accordingly.
@github-actions github-actions bot added the python bindings label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AArch64 Arch python bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AArch64 ror instruction shift encoded differently than other shifts
1 participant