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] Missing Access field and instruction Groups in instruction vaddpd with operand suffix modifiers #2577

Open
Mar3yZhang opened this issue Dec 7, 2024 · 2 comments
Labels
bug Something is not working as it should X86 Arch

Comments

@Mar3yZhang
Copy link

Work environment

Questions Answers
OS/arch/bits x86_64 Ubuntu 20.04
Architecture x86_64
Source of Capstone git clone, default on next branch.
Version/git commit v6.0.0, e46838

Instruction bytes giving faulty results

0x85 0x58 0x01

Expected results

It should be:

$ ./cstool -d x64 "62f1ed3858cb"
 0  62 f1 ed 38 58 cb                                vaddpd     zmm1, zmm2, zmm3, {rd-sae} 
        ID: 759 (vaddpd)
        Prefix:0x00 0x00 0x00 0x00 
        Opcode:0x62 0xf1 0xed 0x48 
        rex: 0x48
        addr_size: 8
        modrm: 0xcb
        disp: 0x0
        sib: 0x0
        op_count: 3
                operands[0].type: REG = zmm1
                operands[0].size: 64
*****         operands[0].access: WRITE           ******* MISSING LINE *****
                operands[1].type: REG = zmm2
                operands[1].size: 64
*****         operands[1].access: READ            ******* MISSING LINE *****
                operands[2].type: REG = zmm3
                operands[2].size: 64
*****         operands[2].access: READE          ******* MISSING LINE *****
*****      Registers read: zmm2 zmm3             ******* MISSING LINE *****
*****      Registers modified: zmm1              ******* MISSING LINE *****
*****      Groups: avx512                        ******* MISSING LINE *****

Steps to get the wrong result

With cstool:

$ ./cstool_v6.0.0 -d x64 "62f1ed3858cb"
 0  62 f1 ed 38 58 cb                                vaddpd     zmm1, zmm2, zmm3, {rd-sae}
        ID: 759 (vaddpd)
        Prefix:0x00 0x00 0x00 0x00 
        Opcode:0x62 0xf1 0xed 0x38 
        rex: 0x48
        addr_size: 8
        modrm: 0xcb
        disp: 0x0
        sib: 0x0
        avx_sae: 1
        avx_rm: 2
        op_count: 3
                operands[0].type: REG = zmm1
                operands[0].size: 64
                operands[1].type: REG = zmm2
                operands[1].size: 64
                operands[2].type: REG = zmm3
                operands[2].size: 64

Additional Logs, screenshots, source code, configuration dump, ...

  • This issue is detected with a fully automatic decoder testing tool based on my research. Please add a Bug tag to this page if you verify it's a problem. It means a lot to me and my research. Thank you for your consideration😊!
@Rot127 Rot127 added bug Something is not working as it should X86 Arch labels Dec 7, 2024
@Rot127
Copy link
Collaborator

Rot127 commented Dec 7, 2024

If your tool finds more, please bundle them into a single issue. x86 is pretty outdated and there will will be much more.

@Mar3yZhang
Copy link
Author

If your tool finds more, please bundle them into a single issue. x86 is pretty outdated and there will will be much more.

Well received. Thank you for your reminder 😊.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as it should X86 Arch
Projects
None yet
Development

No branches or pull requests

2 participants