* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE.
/** * Defines the `ZydisInstructionEncodingFlags` data-type.
*/ typedef ZyanU8 ZydisInstructionEncodingFlags;
/** * The instruction has an optional modrm byte.
*/ #define ZYDIS_INSTR_ENC_FLAG_HAS_MODRM 0x01
/** * The instruction has an optional displacement value.
*/ #define ZYDIS_INSTR_ENC_FLAG_HAS_DISP 0x02
/** * The instruction has an optional immediate value.
*/ #define ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 0x04
/** * The instruction has a second optional immediate value.
*/ #define ZYDIS_INSTR_ENC_FLAG_HAS_IMM1 0x08
/** * The instruction ignores the value of `modrm.mod` and always assumes `modrm.mod == 3` * ("reg, reg" - form). * * Instructions with this flag can't have a SIB byte or a displacement value.
*/ #define ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM 0x10
/** * Defines the `ZydisInstructionEncodingInfo` struct.
*/ typedefstruct ZydisInstructionEncodingInfo_
{ /** * Contains flags with information about the physical instruction-encoding.
*/
ZydisInstructionEncodingFlags flags; /** * Displacement info.
*/ struct
{ /** * The size of the displacement value.
*/
ZyanU8 size[3];
} disp; /** * Immediate info.
*/ struct
{ /** * The size of the immediate value.
*/
ZyanU8 size[3]; /** * Signals, if the value is signed.
*/
ZyanBool is_signed; /** * Signals, if the value is a relative offset.
*/
ZyanBool is_relative;
} imm[2];
} ZydisInstructionEncodingInfo;
/** * Returns the root node of the instruction tree. * * @return The root node of the instruction tree.
*/
ZYAN_INLINE const ZydisDecoderTreeNode* ZydisDecoderTreeGetRootNode(void)
{ return &zydis_decoder_tree_root;
}
/** * Returns the child node of `parent` specified by `index`. * * @param parent The parent node. * @param index The index of the child node to retrieve. * * @return The specified child node.
*/
ZYDIS_NO_EXPORT const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode( const ZydisDecoderTreeNode* parent, ZyanU16 index);
/** * Returns information about optional instruction parts (like modrm, displacement or * immediates) for the instruction that is linked to the given `node`. * * @param node The instruction definition node. * @param info A pointer to the `ZydisInstructionParts` struct.
*/
ZYDIS_NO_EXPORT void ZydisGetInstructionEncodingInfo(const ZydisDecoderTreeNode* node, const ZydisInstructionEncodingInfo** info);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.