Skip to content

[Proposal] Features to get maximum possible encode length of given mnemonic(or +given operands)  #548

Open
@laie

Description

@laie

Currently I am preallocating 15 bytes(absolute maximum size) per an insn, for a recompilation.
However, most of the instructions are not that large. And the preallocation gets too big compared to what it needs to be

Tried out ZydisGetEncodableInstructions, but there was no straightforward length information, and it seemed like zydis encoder is designed that like it figures out the length by actually trying the encoding.

If there was a ZydisEncoderGetMaxLengthForMnemonic(), ZydisEncoderGetMaxLength(mnem, operands), it would have been very very helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions