Skip to content

x86 - AVX512 mask registers show up as invalid #1672

@iconmaster5326

Description

@iconmaster5326

The next branch of Capstone doesn't seem to recognize the mask registers of x86's AVX512 extension any longer. For example:

$ kstool x64 'kmovw eax, k0'
kmovw eax, k0 = [ c5 f8 93 c0 ]
$ cstool -d x64 c5f893c0
 0  c5 f8 93 c0                                      kmovw      eax, k0
        ID: 288 (kmovw)
        Prefix:0x00 0x00 0x00 0x00 
        Opcode:0xc5 0xf8 0x00 0x00 
        rex: 0x40
        addr_size: 8
        modrm: 0xc0
        disp: 0x0
        sib: 0x0
        op_count: 2
                operands[0].type: REG = eax
                operands[0].size: 4
                operands[0].access: WRITE
                operands[1].type: REG = (null)
                operands[1].size: 0
                operands[1].access: READ
        Registers read: (null)
        Registers modified: eax
        Groups: avx512 

As you can see, Capstone gets the op_str correct, but fails to give the user operands[1].type, which is X86_REG_INVALID instead of X86_REG_K0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions