Skip to content

Conversation

@yjxxin
Copy link
Contributor

@yjxxin yjxxin commented Nov 23, 2021

Hi team

When we added the semantic function of AVX512 instructions, we found that remill did not implement the reading of the k register. For example, the following AVX512 instruction:

instruction binary
kmovw   %ebx, %k1 c5 f8 92 cb

In the above instruction, the k1 register is used as the result operand, and it is also indicated in docs/XED/xed.txt that the K mask register needs to be used:

2630 KMOVW KMOVW_MASKmskw_MASKu16_AVX512 KMASK AVX512VEX AVX512F_KOP ATTRIBUTES: KMASK 2
0 REG0 EXPLICIT W NT_LOOKUP_FN I1 MASK_R
1 REG1 EXPLICIT R NT_LOOKUP_FN U16 MASK_B

But remill does not provide a method to read the K register.
To solve this problem, we need to add a variable to store the value of the K register in State.h, and add the size of the K register to the State variable.

I have submitted a PR and implemented the KMOVW instruction, hoping to provide valuable comments

@yjxxin yjxxin closed this Nov 23, 2021
@yjxxin yjxxin reopened this Nov 23, 2021
@pgoodman pgoodman merged commit bd75b4f into lifting-bits:master Nov 24, 2021
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.

2 participants