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

amd64: Use Intel behavior for 16b sh[lr]d when count>16 #64

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

mborgerson
Copy link
Member

According to the Intel SDM for shld and shrd instructions, the result is undefined when shift count is greater than operand size. Observed behavior of Intel CPUs in this case is to shift bits in from source first, then from destination. This is also how QEMU models these instructions. Discovered via QEMU differential tests.

Submitted upstream at https://bugs.kde.org/show_bug.cgi?id=492961

According to the Intel SDM for `shld` and `shrd` instructions, the
result is undefined when shift count is greater than operand size.
Observed behavior of Intel CPUs in this case is to shift bits in from
source first, then from destination.  This is also how QEMU models these
instructions.  Discovered via QEMU differential tests.
@mborgerson mborgerson merged commit 1ac1f89 into angr:master Sep 10, 2024
3 checks passed
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.

1 participant