Skip to content

x86: fix JO/JNO operand size in 64-bit mode - #3067

Open
raaller wants to merge 1 commit into
capstone-engine:nextfrom
raaller:fix/x86-64-jcc-opsize
Open

x86: fix JO/JNO operand size in 64-bit mode#3067
raaller wants to merge 1 commit into
capstone-engine:nextfrom
raaller:fix/x86-64-jcc-opsize

Conversation

@raaller

@raaller raaller commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

0F 80 (JO) and 0F 81 (JNO) were missing from that switch, this caused JO/JNO to end after five bytes and left the remaining bytes to be decoded as subsequent instructions.

This change adds 0x80 and 0x81 to the existing 64-bit near-Jcc handling so the full 32-bit displacement is consumed

Test plan

Added regression tests for both affected instructions in tests/issues/issues.yaml:

66 0f 80 ce fa a5 d8 decodes as a single jo instruction with a 32-bit relative displacement in 64-bit mode
66 0f 81 ce fa a5 d8 decodes as a single jno instruction with a 32-bit relative displacement in 64-bit mode

All testes passed

Closing issues

Closes #3037

@github-actions github-actions Bot added the X86 Arch label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

X86 Arch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

X86-64 decode bug of 0x66 JO/JNO

1 participant