Change st0
operand visibility as specified by SDM
#12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As explained in zyantific/zydis#189, we previously had
st0
as an explicit operand where it is supposed to be suppressed. This PR fixes all such cases.The changes were created using the following Python script. Comment/uncomment calls in last lines to select mode. Essentially, it interactively goes through all instructions with a visible
st0
operand and prompts on whether you want to add it to the list for fixup. In the apply step, for all selected instructions, it then moves thest0
operand to the back of the operand list and adds thevisible: false
flag.Some of the matching encodings were undocumented. In these cases, I selected the visibility based on the formatting for similar encodings / instructions.
The corresponding state file for the choices I made is here: https://gist.github.com/athre0z/24488080a06c295d8bdb9a78709a1876