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

x86: opsize override prefix not handled for 16-bit MOVSX/MOVZX #6525

Conversation

Sleigh-InSPECtor
Copy link
Contributor

The MOVSX/MOVZX constructors with a 16-bit source do not handle the opsize size override prefix (0x66). This PR fixes the following:

  • 660fbfc1 "MOVSX AX,CX" with RAX=0xaaaaaaaa, CX=0xcccc

    • Hardware Reference (AMD CPU & Intel CPU): { RAX=0xaaaacccc }
    • x86:LE:64:default (Existing): "MOVSX EAX,CX" { RAX=0xffffcccc }
    • x86:LE:64:default (This patch): "MOVSX AX,CX" { RAX=0xaaaacccc }
  • 660fb7c1 "MOVZX AX,CX" with RAX=0xaaaaaaaa, CX=0xcccc

    • Hardware Reference (AMD CPU & Intel CPU): { RAX=0xaaaacccc }
    • x86:LE:64:default (Existing): "MOVZX EAX,CX" { RAX=0x0000cccc }
    • x86:LE:64:default (This patch): "MOVZX AX,CX" { RAX=0xaaaacccc }

@ryanmkurtz ryanmkurtz added Feature: Processor/x86 Status: Triage Information is being gathered labels May 16, 2024
@ghidracadabra ghidracadabra added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Triage Information is being gathered labels May 22, 2024
@ryanmkurtz ryanmkurtz added this to the 11.1 milestone Jun 3, 2024
@ryanmkurtz ryanmkurtz closed this in 0a99c5f Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Processor/x86 Status: Internal This is being tracked internally by the Ghidra team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants