Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_MASMformatter 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
ZydisInfoand 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 ofFUCOMPwithout 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
F1opcode likeint1in other assemblers, so I made it emitINVALID_MNEMONICin 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. Forint3I had to break it up intoint 3hfor MASM to emit theCCopcode, 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.