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.
I made fixes for the
INTEL_MASM
formatter style to get it closer to emitting assembly MASM accepts. This should be enough of an improvement to close #535.I added the style to
ZydisInfo
and added tests. I also needed to change how the formatted buffer and restore worked since I couldn't get it to omit the first operand ofFUCOMP
without also omitting the mnemonic. There's a good chance this wasn't necessary and I was doing something wrong. These changes should also fix #497.MASM doesn't have a mnemonic for the
F1
opcode likeint1
in other assemblers, so I made it emitINVALID_MNEMONIC
in that case. It is possible to use a byte directive to emit the byte value directly but that seems out of scope for Zydis, if there is a different way you want this to be handled let me know. Forint3
I had to break it up intoint 3h
for MASM to emit theCC
opcode, I did this pretty hackily in the MASM format instruction function so that other hooks would still be able to handle it normally, let me know of a better way.This is my first PR here so please let me know what I need to change to get this merged. I would like to see MASM support improve.