Closed odzhan closed 3 months ago
The encoded instructions continue to work fine but I'd rather keep the original operand encoding if possible.
Not possible. Encoder's API is semantic-driven, so encoder request describes semantics of an instruction and encoder will fulfil that request if possible. That's the contract. By design there's no control over details of physical encoding, so if there are multiple encodings that result in instruction of the same size encoder is free to choose which one to use.
Okay. That's too bad. Would be nice to have support for controlling the operand encoding. Thanks for response.
@odzhan Out of interest: What would be the use-case that requires a specific encoding to be emitted?
This is just one example because it can happen with other instructions.
The decoder will work fine with the following MOV r32, r/m32 mnemonic.
8BC3 mov eax,ebx
But using an encoding request will generate the following MOV r/m32, r32 instead.
89D8 mov eax,ebx
The encoded instructions continue to work fine but I'd rather keep the original operand encoding if possible. Is there a way to keep the original with existing code base or is an update needed?
thank you