Preserve OSIZE for APX EVEX MAP4#378
Open
RatinCN wants to merge 1 commit into
Open
Conversation
EVEX MAP4 promotes legacy integer instructions, so EVEX.pp=01 can still act as an operand-size override when W=0. Keep mandatory-prefix fixed sizing for other VEX/EVEX maps, but allow MAP4 to select nFixedSize16.
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.
Addendum to #374, already fixed in my SlimDetours in commit da1e214.
EVEX MAP4promotes legacy integer instructions, so EVEX.pp=01 can still act as an operand-size override when W=0. Keep mandatory-prefix fixed sizing for other VEX/EVEX maps, but allow MAP4 to selectnFixedSize16.#374 made all VEX/EVEX instructions use
nFixedSize, ignoringm_bOperandOverride.That is correct for ordinary VEX/EVEX maps where
ppis a mandatory prefix, but APX EVEX MAP4 promotes legacy integer instructions.For MAP4,
EVEX.pp=01can still act as OSIZE whenEVEX.W=0.For example, an APX EVEX MAP4 Group 1 immediate instruction with
pp=66,W=0, and opcode81 /0should consume animm16. The current logic consumesimm32, over-reading two bytes from the following instruction.After applying this PR, this instruction will be calculated as 8 bytes in size, no longer 10 bytes.