* 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.
/** * Maximum value of this enum.
*/
ZYDIS_SEMANTIC_OPTYPE_MAX_VALUE = ZYDIS_SEMANTIC_OPTYPE_MIB, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_SEMANTIC_OPTYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SEMANTIC_OPTYPE_MAX_VALUE)
} ZydisSemanticOperandType;
/** * Maximum value of this enum.
*/
ZYDIS_IELEMENT_TYPE_MAX_VALUE = ZYDIS_IELEMENT_TYPE_CC5, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_IELEMENT_TYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IELEMENT_TYPE_MAX_VALUE)
} ZydisInternalElementType;
/** * Maximum value of this enum.
*/
ZYDIS_IMPLREG_TYPE_MAX_VALUE = ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_IMPLREG_TYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IMPLREG_TYPE_MAX_VALUE)
} ZydisImplicitRegisterType;
/** * Maximum value of this enum.
*/
ZYDIS_IMPLMEM_BASE_MAX_VALUE = ZYDIS_IMPLMEM_BASE_SBP, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_IMPLMEM_BASE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IMPLMEM_BASE_MAX_VALUE)
} ZydisImplicitMemBase;
/** * Maximum value of this enum.
*/
ZYDIS_RW_ACTION_MAX_VALUE = ZYDIS_RW_ACTION_READWRITE, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_RW_ACTION_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_RW_ACTION_MAX_VALUE)
} ZydisReadWriteAction;
/** * Maximum value of this enum.
*/
ZYDIS_IVECTOR_LENGTH_MAX_VALUE = ZYDIS_IVECTOR_LENGTH_FIXED_512, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_IVECTOR_LENGTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IVECTOR_LENGTH_MAX_VALUE)
} ZydisInternalVectorLength;
/** * Maximum value of this enum.
*/
ZYDIS_IELEMENT_SIZE_MAX_VALUE = ZYDIS_IELEMENT_SIZE_128, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_IELEMENT_SIZE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_IELEMENT_SIZE_MAX_VALUE)
} ZydisInternalElementSize;
/** * Maximum value of this enum.
*/
ZYDIS_EVEX_FUNC_MAX_VALUE = ZYDIS_EVEX_FUNC_SAE, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_EVEX_FUNC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_EVEX_FUNC_MAX_VALUE)
} ZydisEVEXFunctionality;
/** * Maximum value of this enum.
*/
ZYDIS_TUPLETYPE_MAX_VALUE = ZYDIS_TUPLETYPE_QUARTER, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_TUPLETYPE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_TUPLETYPE_MAX_VALUE)
} ZydisEVEXTupleType;
/** * Maximum value of this enum.
*/
ZYDIS_MVEX_FUNC_MAX_VALUE = ZYDIS_MVEX_FUNC_DI_64, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_MVEX_FUNC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MVEX_FUNC_MAX_VALUE)
} ZydisMVEXFunctionality;
/** * Maximum value of this enum.
*/
ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE = ZYDIS_VEX_STATIC_BROADCAST_2_TO_4, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_VEX_STATIC_BROADCAST_REQUIRED_BITS =
ZYAN_BITS_TO_REPRESENT(ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE)
} ZydisVEXStaticBroadcast;
/** * Maximum value of this enum.
*/
ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE = ZYDIS_EVEX_STATIC_BROADCAST_8_TO_16, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_EVEX_STATIC_BROADCAST_REQUIRED_BITS =
ZYAN_BITS_TO_REPRESENT(ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE)
} ZydisEVEXStaticBroadcast;
/** * Maximum value of this enum.
*/
ZYDIS_MVEX_STATIC_BROADCAST_MAX_VALUE = ZYDIS_MVEX_STATIC_BROADCAST_4_TO_16, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_MVEX_STATIC_BROADCAST_REQUIRED_BITS =
ZYAN_BITS_TO_REPRESENT(ZYDIS_MVEX_STATIC_BROADCAST_MAX_VALUE)
} ZydisMVEXStaticBroadcast;
/** * Defines the `ZydisMaskPolicy` enum.
*/ typedefenum ZydisMaskPolicy_
{
ZYDIS_MASK_POLICY_INVALID, /** * The instruction accepts mask-registers other than the default-mask (K0), but * does not require them.
*/
ZYDIS_MASK_POLICY_ALLOWED, /** * The instruction requires a mask-register other than the default-mask (K0).
*/
ZYDIS_MASK_POLICY_REQUIRED, /** * The instruction does not allow a mask-register other than the default-mask (K0).
*/
ZYDIS_MASK_POLICY_FORBIDDEN,
/** * Maximum value of this enum.
*/
ZYDIS_MASK_POLICY_MAX_VALUE = ZYDIS_MASK_POLICY_FORBIDDEN, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_MASK_POLICY_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MASK_POLICY_MAX_VALUE)
} ZydisMaskPolicy;
/** * Maximum value of this enum.
*/
ZYDIS_MASK_OVERRIDE_MAX_VALUE = ZYDIS_MASK_OVERRIDE_CONTROL, /** * The minimum number of bits required to represent all values of this enum.
*/
ZYDIS_MASK_OVERRIDE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MASK_OVERRIDE_MAX_VALUE)
} ZydisMaskOverride;
// MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct // enum types
ZYAN_STATIC_ASSERT(ZYDIS_VEX_STATIC_BROADCAST_REQUIRED_BITS <= 8);
// MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct // enum types
ZYAN_STATIC_ASSERT(ZYDIS_MVEX_FUNC_REQUIRED_BITS <= 8);
ZYAN_STATIC_ASSERT(ZYDIS_MASK_POLICY_REQUIRED_BITS <= 8);
ZYAN_STATIC_ASSERT(ZYDIS_MVEX_STATIC_BROADCAST_REQUIRED_BITS <= 8);
/* * Contains information about the CPU/FPU flags accessed by an instruction. * * We don't want this struct to be packed! A pointer to the individual members will be used by the * `ZydisDecodedInstruction` struct.
*/ typedefstruct ZydisDefinitionAccessedFlags_
{
ZydisAccessedFlags cpu_flags;
ZydisAccessedFlags fpu_flags;
} ZydisDefinitionAccessedFlags;
/** * Returns the instruction-definition with the given `encoding` and `id`. * * @param encoding The instruction-encoding. * @param id The definition-id. * @param definition A pointer to the variable that receives a pointer to the instruction- * definition.
*/
ZYDIS_NO_EXPORT void ZydisGetInstructionDefinition(ZydisInstructionEncoding encoding,
ZyanU16 id, const ZydisInstructionDefinition** definition);
#ifndef ZYDIS_MINIMAL_MODE /** * Returns the the operand-definitions for the given instruction-`definition`. * * @param definition A pointer to the instruction-definition. * * @return A pointer to the first operand definition of the instruction, or `ZYAN_NULL`.
*/
ZYDIS_NO_EXPORT const ZydisOperandDefinition* ZydisGetOperandDefinitions( const ZydisInstructionDefinition* definition); #endif
/* ---------------------------------------------------------------------------------------------- */ /* Element info */ /* ---------------------------------------------------------------------------------------------- */
#ifndef ZYDIS_MINIMAL_MODE /** * Returns the actual type and size of an internal element-type. * * @param element The internal element type. * @param type The actual element type. * @param size The element size.
*/
ZYDIS_NO_EXPORT void ZydisGetElementInfo(ZydisInternalElementType element, ZydisElementType* type,
ZydisElementSize* size); #endif
#ifndef ZYDIS_MINIMAL_MODE /** * Returns the the operand-definitions for the given instruction-`definition`. * * @param definition A pointer to the instruction-definition. * @param flags A pointer to the variable that receives the `ZydisDefinitionAccessedFlags` * struct. * * @return `ZYAN_TRUE`, if the instruction accesses any flags, or `ZYAN_FALSE`, if not.
*/
ZYDIS_NO_EXPORT ZyanBool ZydisGetAccessedFlags(const ZydisInstructionDefinition* definition, const ZydisDefinitionAccessedFlags** flags); #endif
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.