Zydis  v3.0.0
SharedData.h
Go to the documentation of this file.
1 /***************************************************************************************************
2 
3  Zyan Disassembler Library (Zydis)
4 
5  Original Author : Florian Bernd
6 
7  * Permission is hereby granted, free of charge, to any person obtaining a copy
8  * of this software and associated documentation files (the "Software"), to deal
9  * in the Software without restriction, including without limitation the rights
10  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11  * copies of the Software, and to permit persons to whom the Software is
12  * furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in all
15  * copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24 
25 ***************************************************************************************************/
26 
27 #ifndef ZYDIS_INTERNAL_SHAREDDATA_H
28 #define ZYDIS_INTERNAL_SHAREDDATA_H
29 
30 #include <Zycore/Defines.h>
31 #include <Zydis/Mnemonic.h>
32 #include <Zydis/Register.h>
33 #include <Zydis/SharedTypes.h>
34 #include <Zydis/DecoderTypes.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /* ============================================================================================== */
41 /* Enums and types */
42 /* ============================================================================================== */
43 
44 // MSVC does not like types other than (un-)signed int for bit-fields
45 #ifdef ZYAN_MSVC
46 # pragma warning(push)
47 # pragma warning(disable:4214)
48 #endif
49 
50 #pragma pack(push, 1)
51 
52 /* ---------------------------------------------------------------------------------------------- */
53 /* Operand definition */
54 /* ---------------------------------------------------------------------------------------------- */
55 
60 {
93 
103 
104 /* ---------------------------------------------------------------------------------------------- */
105 
110 {
134 
144 
145 /* ---------------------------------------------------------------------------------------------- */
146 
151 {
159 
169 
170 /* ---------------------------------------------------------------------------------------------- */
171 
176 {
186 
196 
197 /* ---------------------------------------------------------------------------------------------- */
198 
199 // MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct
200 // enum types
209 
214 {
218  ZyanU16 size[3];
220  union
221  {
223  struct
224  {
226  union
227  {
229  ZyanU8 id ZYAN_BITFIELD(6);
230  } reg;
231  } reg;
232  struct
233  {
234  ZyanU8 seg ZYAN_BITFIELD(3);
236  } mem;
237  } op;
239 
240 /* ---------------------------------------------------------------------------------------------- */
241 /* Instruction definition */
242 /* ---------------------------------------------------------------------------------------------- */
243 
248 {
253 
263 
264 /* ---------------------------------------------------------------------------------------------- */
265 
270 {
281 
291 
292 /* ---------------------------------------------------------------------------------------------- */
293 
298 {
303 
313 
314 /* ---------------------------------------------------------------------------------------------- */
315 
320 {
327 
337 
338 /* ---------------------------------------------------------------------------------------------- */
339 
344 {
358 
368 
369 /* ---------------------------------------------------------------------------------------------- */
370 
375 {
437 
447 
448 /* ---------------------------------------------------------------------------------------------- */
449 
454 {
559 
569 
570 /* ---------------------------------------------------------------------------------------------- */
571 
576 {
584 
593  ZYAN_BITS_TO_REPRESENT(ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE)
595 
596 /* ---------------------------------------------------------------------------------------------- */
597 
602 {
616 
625  ZYAN_BITS_TO_REPRESENT(ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE)
627 
628 /* ---------------------------------------------------------------------------------------------- */
629 
634 {
640 
649  ZYAN_BITS_TO_REPRESENT(ZYDIS_MVEX_STATIC_BROADCAST_MAX_VALUE)
651 
652 /* ---------------------------------------------------------------------------------------------- */
653 
657 typedef enum ZydisMaskPolicy_
658 {
673 
683 
684 /* ---------------------------------------------------------------------------------------------- */
685 
689 typedef enum ZydisMaskOverride_
690 {
694 
704 
705 /* ---------------------------------------------------------------------------------------------- */
706 
707 // MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct
708 // enum types
717 
718 #ifndef ZYDIS_MINIMAL_MODE
719 # define ZYDIS_INSTRUCTION_DEFINITION_BASE \
720  ZyanU16 mnemonic ZYAN_BITFIELD(ZYDIS_MNEMONIC_REQUIRED_BITS); \
721  ZyanU8 operand_count ZYAN_BITFIELD( 4); \
722  ZyanU16 operand_reference ZYAN_BITFIELD(15); \
723  ZyanU8 operand_size_map ZYAN_BITFIELD( 3); \
724  ZyanU8 address_size_map ZYAN_BITFIELD( 2); \
725  ZyanU8 flags_reference ZYAN_BITFIELD( 7); \
726  ZyanBool requires_protected_mode ZYAN_BITFIELD( 1); \
727  ZyanU8 category ZYAN_BITFIELD(ZYDIS_CATEGORY_REQUIRED_BITS); \
728  ZyanU8 isa_set ZYAN_BITFIELD(ZYDIS_ISA_SET_REQUIRED_BITS); \
729  ZyanU8 isa_ext ZYAN_BITFIELD(ZYDIS_ISA_EXT_REQUIRED_BITS); \
730  ZyanU8 branch_type ZYAN_BITFIELD(ZYDIS_BRANCH_TYPE_REQUIRED_BITS); \
731  ZyanU8 exception_class ZYAN_BITFIELD(ZYDIS_EXCEPTION_CLASS_REQUIRED_BITS); \
732  ZyanU8 constr_REG ZYAN_BITFIELD(ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS); \
733  ZyanU8 constr_RM ZYAN_BITFIELD(ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS); \
734  ZyanU8 cpu_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS); \
735  ZyanU8 fpu_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS); \
736  ZyanU8 xmm_state ZYAN_BITFIELD(ZYDIS_RW_ACTION_REQUIRED_BITS)
737 #else
738 # define ZYDIS_INSTRUCTION_DEFINITION_BASE \
739  ZyanU16 mnemonic ZYAN_BITFIELD(ZYDIS_MNEMONIC_REQUIRED_BITS); \
740  ZyanU8 operand_size_map ZYAN_BITFIELD( 3); \
741  ZyanU8 address_size_map ZYAN_BITFIELD( 2); \
742  ZyanBool requires_protected_mode ZYAN_BITFIELD( 1); \
743  ZyanU8 constr_REG ZYAN_BITFIELD(ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS); \
744  ZyanU8 constr_RM ZYAN_BITFIELD(ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS)
745 #endif
746 
747 #define ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR \
748  ZYDIS_INSTRUCTION_DEFINITION_BASE; \
749  ZyanU8 constr_NDSNDD ZYAN_BITFIELD(ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS)
750 
751 #define ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR_INTEL \
752  ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR; \
753  ZyanBool is_gather ZYAN_BITFIELD( 1)
754 
759 {
762 
767 {
769 #ifndef ZYDIS_MINIMAL_MODE
770  ZyanBool is_privileged ZYAN_BITFIELD( 1);
771 #endif
772  ZyanBool accepts_LOCK ZYAN_BITFIELD( 1);
773 #ifndef ZYDIS_MINIMAL_MODE
774  ZyanBool accepts_REP ZYAN_BITFIELD( 1);
775  ZyanBool accepts_REPEREPZ ZYAN_BITFIELD( 1);
776  ZyanBool accepts_REPNEREPNZ ZYAN_BITFIELD( 1);
777  ZyanBool accepts_BOUND ZYAN_BITFIELD( 1);
778  ZyanBool accepts_XACQUIRE ZYAN_BITFIELD( 1);
779  ZyanBool accepts_XRELEASE ZYAN_BITFIELD( 1);
780  ZyanBool accepts_hle_without_lock ZYAN_BITFIELD( 1);
781  ZyanBool accepts_branch_hints ZYAN_BITFIELD( 1);
782  ZyanBool accepts_segment ZYAN_BITFIELD( 1);
783 #endif
785 
790 {
793 
798 {
801 
802 // MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct
803 // enum types
805 
810 {
812 #ifndef ZYDIS_MINIMAL_MODE
814 #endif
816 
817 #ifndef ZYDIS_DISABLE_AVX512
818 
819 // MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct
820 // enum types
828 
833 {
835 #ifndef ZYDIS_MINIMAL_MODE
840 #endif
842  ZyanBool accepts_zero_mask ZYAN_BITFIELD( 1);
843 #ifndef ZYDIS_MINIMAL_MODE
846 #endif
848 #endif
849 
850 #ifndef ZYDIS_DISABLE_KNC
851 
852 // MSVC does not correctly execute the `pragma pack(1)` compiler-directive, if we use the correct
853 // enum types
857 
862 {
866 #ifndef ZYDIS_MINIMAL_MODE
867  ZyanBool has_element_granularity ZYAN_BITFIELD( 1);
869 #endif
871 #endif
872 
873 /* ---------------------------------------------------------------------------------------------- */
874 /* Accessed CPU flags */
875 /* ---------------------------------------------------------------------------------------------- */
876 
877 typedef struct ZydisAccessedFlags_
878 {
881 
882 /* ---------------------------------------------------------------------------------------------- */
883 
884 #pragma pack(pop)
885 
886 #ifdef ZYAN_MSVC
887 # pragma warning(pop)
888 #endif
889 
890 /* ============================================================================================== */
891 /* Functions */
892 /* ============================================================================================== */
893 
894 /* ---------------------------------------------------------------------------------------------- */
895 /* Instruction definition */
896 /* ---------------------------------------------------------------------------------------------- */
897 
907  ZyanU16 id, const ZydisInstructionDefinition** definition);
908 
909 /* ---------------------------------------------------------------------------------------------- */
910 /* Operand definition */
911 /* ---------------------------------------------------------------------------------------------- */
912 
913 #ifndef ZYDIS_MINIMAL_MODE
923 ZYDIS_NO_EXPORT ZyanU8 ZydisGetOperandDefinitions(const ZydisInstructionDefinition* definition,
924  const ZydisOperandDefinition** operand);
925 #endif
926 
927 /* ---------------------------------------------------------------------------------------------- */
928 /* Element info */
929 /* ---------------------------------------------------------------------------------------------- */
930 
931 #ifndef ZYDIS_MINIMAL_MODE
940  ZydisElementSize* size);
941 #endif
942 
943 /* ---------------------------------------------------------------------------------------------- */
944 /* Accessed CPU flags */
945 /* ---------------------------------------------------------------------------------------------- */
946 
947 #ifndef ZYDIS_MINIMAL_MODE
956 ZYDIS_NO_EXPORT ZyanBool ZydisGetAccessedFlags(const ZydisInstructionDefinition* definition,
957  const ZydisAccessedFlags** flags);
958 #endif
959 
960 /* ---------------------------------------------------------------------------------------------- */
961 
962 /* ============================================================================================== */
963 
964 #ifdef __cplusplus
965 }
966 #endif
967 
968 #endif /* ZYDIS_INTERNAL_SHAREDDATA_H */
Defines the basic ZydisDecodedInstruction and ZydisDecodedOperand structs.
@ ZYDIS_EXCEPTION_CLASS_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:675
@ ZYDIS_BRANCH_TYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:614
@ ZYDIS_CPUFLAG_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:530
enum ZydisCPUFlagAction_ ZydisCPUFlagAction
Defines the ZydisCPUFlagAction enum.
@ ZYDIS_ISA_EXT_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: EnumISAExt.h:88
@ ZYDIS_ISA_SET_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: EnumISASet.h:177
@ ZYDIS_CATEGORY_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: EnumInstructionCategory.h:113
@ ZYDIS_MNEMONIC_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: EnumMnemonic.h:1620
@ ZYDIS_REGISTER_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: EnumRegister.h:291
Mnemonic constant definitions and helper functions.
Utility functions and constants for registers.
enum ZydisSemanticOperandType_ ZydisSemanticOperandType
Defines the ZydisSemanticOperandType enum.
enum ZydisEVEXStaticBroadcast_ ZydisEVEXStaticBroadcast
Defines the ZydisEVEXStaticBroadcast enum.
struct ZydisInstructionDefinition_ ZydisInstructionDefinition
Defines the ZydisInstructionDefinition struct.
ZydisEVEXTupleType_
Defines the ZydisEVEXTupleType enum.
Definition: SharedData.h:375
@ ZYDIS_TUPLETYPE_M128
Mem128.
Definition: SharedData.h:432
@ ZYDIS_TUPLETYPE_GSCAT
Gather / Scatter.
Definition: SharedData.h:404
@ ZYDIS_TUPLETYPE_T1F
Tuple1 Fixed.
Definition: SharedData.h:396
@ ZYDIS_TUPLETYPE_T8
Tuple8.
Definition: SharedData.h:416
@ ZYDIS_TUPLETYPE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:441
@ ZYDIS_TUPLETYPE_T4
Tuple4.
Definition: SharedData.h:412
@ ZYDIS_TUPLETYPE_T1S
Tuple1 Scalar.
Definition: SharedData.h:392
@ ZYDIS_TUPLETYPE_FV
Full Vector.
Definition: SharedData.h:380
@ ZYDIS_TUPLETYPE_OVM
OctMem.
Definition: SharedData.h:428
@ ZYDIS_TUPLETYPE_FVM
Full Vector Mem.
Definition: SharedData.h:388
@ ZYDIS_TUPLETYPE_QVM
QuarterMem.
Definition: SharedData.h:424
@ ZYDIS_TUPLETYPE_HV
Half Vector.
Definition: SharedData.h:384
@ ZYDIS_TUPLETYPE_DUP
MOVDDUP.
Definition: SharedData.h:436
@ ZYDIS_TUPLETYPE_INVALID
Definition: SharedData.h:376
@ ZYDIS_TUPLETYPE_HVM
Half Mem.
Definition: SharedData.h:420
@ ZYDIS_TUPLETYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:445
@ ZYDIS_TUPLETYPE_T1_4X
Tuple1 4x32.
Definition: SharedData.h:400
@ ZYDIS_TUPLETYPE_T2
Tuple2.
Definition: SharedData.h:408
enum ZydisMVEXFunctionality_ ZydisMVEXFunctionality
Defines the ZydisMVEXFunctionality enum.
ZydisMVEXFunctionality_
Defines the ZydisMVEXFunctionality enum.
Definition: SharedData.h:454
@ ZYDIS_MVEX_FUNC_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:563
@ ZYDIS_MVEX_FUNC_F_32
No special operation (32bit float elements).
Definition: SharedData.h:474
@ ZYDIS_MVEX_FUNC_SF_64
Sf64(mem).
Definition: SharedData.h:510
@ ZYDIS_MVEX_FUNC_DI_32
Di32.
Definition: SharedData.h:554
@ ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16
Si32(mem) broadcast 4to16 only.
Definition: SharedData.h:522
@ ZYDIS_MVEX_FUNC_SF_32_BCST
Sf32(mem) broadcast only.
Definition: SharedData.h:502
@ ZYDIS_MVEX_FUNC_DF_64
Df64.
Definition: SharedData.h:550
@ ZYDIS_MVEX_FUNC_F_64
No special operation (64bit float elements).
Definition: SharedData.h:482
@ ZYDIS_MVEX_FUNC_SI_32_BCST
Si32(mem) broadcast only.
Definition: SharedData.h:518
@ ZYDIS_MVEX_FUNC_INVALID
MVEX.SSS must be 000b.
Definition: SharedData.h:462
@ ZYDIS_MVEX_FUNC_I_64
No special operation (64bit uint elements).
Definition: SharedData.h:486
@ ZYDIS_MVEX_FUNC_SI_32
Si32(mem).
Definition: SharedData.h:514
@ ZYDIS_MVEX_FUNC_SWIZZLE_64
Sf64(reg) or Si64(reg).
Definition: SharedData.h:494
@ ZYDIS_MVEX_FUNC_SI_64
Si64(mem).
Definition: SharedData.h:526
@ ZYDIS_MVEX_FUNC_I_32
No special operation (32bit uint elements).
Definition: SharedData.h:478
@ ZYDIS_MVEX_FUNC_SF_32
Sf32(mem).
Definition: SharedData.h:498
@ ZYDIS_MVEX_FUNC_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:567
@ ZYDIS_MVEX_FUNC_SAE
MVEX.SSS controls sae functionality.
Definition: SharedData.h:470
@ ZYDIS_MVEX_FUNC_SWIZZLE_32
Sf32(reg) or Si32(reg).
Definition: SharedData.h:490
@ ZYDIS_MVEX_FUNC_UI_64
Ui64.
Definition: SharedData.h:542
@ ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16
Sf32(mem) broadcast 4to16 only.
Definition: SharedData.h:506
@ ZYDIS_MVEX_FUNC_DI_64
Di64.
Definition: SharedData.h:558
@ ZYDIS_MVEX_FUNC_DF_32
Df32.
Definition: SharedData.h:546
@ ZYDIS_MVEX_FUNC_UI_32
Ui32.
Definition: SharedData.h:538
@ ZYDIS_MVEX_FUNC_IGNORED
The MVEX.SSS value is ignored.
Definition: SharedData.h:458
@ ZYDIS_MVEX_FUNC_UF_32
Uf32.
Definition: SharedData.h:530
@ ZYDIS_MVEX_FUNC_UF_64
Uf64.
Definition: SharedData.h:534
@ ZYDIS_MVEX_FUNC_RC
MVEX.SSS controls embedded-rounding functionality.
Definition: SharedData.h:466
enum ZydisImplicitMemBase_ ZydisImplicitMemBase
Defines the ZydisImplicitMemBase enum.
ZydisEVEXFunctionality_
Defines the ZydisEVEXFunctionality enum.
Definition: SharedData.h:344
@ ZYDIS_EVEX_FUNC_INVALID
Definition: SharedData.h:345
@ ZYDIS_EVEX_FUNC_SAE
EVEX.b enables sae functionality.
Definition: SharedData.h:357
@ ZYDIS_EVEX_FUNC_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:362
@ ZYDIS_EVEX_FUNC_BC
EVEX.b enables broadcast functionality.
Definition: SharedData.h:349
@ ZYDIS_EVEX_FUNC_RC
EVEX.b enables embedded-rounding functionality.
Definition: SharedData.h:353
@ ZYDIS_EVEX_FUNC_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:366
enum ZydisEVEXFunctionality_ ZydisEVEXFunctionality
Defines the ZydisEVEXFunctionality enum.
enum ZydisImplicitRegisterType_ ZydisImplicitRegisterType
Defines the ZydisImplicitRegisterType enum.
ZydisImplicitRegisterType_
Defines the ZydisImplicitRegisterType enum.
Definition: SharedData.h:151
@ ZYDIS_IMPLREG_TYPE_IP_ASZ
Definition: SharedData.h:156
@ ZYDIS_IMPLREG_TYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:167
@ ZYDIS_IMPLREG_TYPE_GPR_ASZ
Definition: SharedData.h:154
@ ZYDIS_IMPLREG_TYPE_STATIC
Definition: SharedData.h:152
@ ZYDIS_IMPLREG_TYPE_GPR_OSZ
Definition: SharedData.h:153
@ ZYDIS_IMPLREG_TYPE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:163
@ ZYDIS_IMPLREG_TYPE_IP_SSZ
Definition: SharedData.h:157
@ ZYDIS_IMPLREG_TYPE_FLAGS_SSZ
Definition: SharedData.h:158
@ ZYDIS_IMPLREG_TYPE_GPR_SSZ
Definition: SharedData.h:155
ZydisInternalElementType_
Defines the ZydisInternalElementType enum.
Definition: SharedData.h:110
@ ZYDIS_IELEMENT_TYPE_STRUCT
Definition: SharedData.h:113
@ ZYDIS_IELEMENT_TYPE_FLOAT64
Definition: SharedData.h:129
@ ZYDIS_IELEMENT_TYPE_INT
Definition: SharedData.h:114
@ ZYDIS_IELEMENT_TYPE_FLOAT16
Definition: SharedData.h:127
@ ZYDIS_IELEMENT_TYPE_UINT32
Definition: SharedData.h:123
@ ZYDIS_IELEMENT_TYPE_UINT8
Definition: SharedData.h:121
@ ZYDIS_IELEMENT_TYPE_FLOAT80
Definition: SharedData.h:130
@ ZYDIS_IELEMENT_TYPE_UINT16
Definition: SharedData.h:122
@ ZYDIS_IELEMENT_TYPE_VARIABLE
Definition: SharedData.h:112
@ ZYDIS_IELEMENT_TYPE_UINT64
Definition: SharedData.h:124
@ ZYDIS_IELEMENT_TYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:142
@ ZYDIS_IELEMENT_TYPE_UINT256
Definition: SharedData.h:126
@ ZYDIS_IELEMENT_TYPE_INT16
Definition: SharedData.h:118
@ ZYDIS_IELEMENT_TYPE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:138
@ ZYDIS_IELEMENT_TYPE_INT8
Definition: SharedData.h:117
@ ZYDIS_IELEMENT_TYPE_BCD80
Definition: SharedData.h:131
@ ZYDIS_IELEMENT_TYPE_INT32
Definition: SharedData.h:119
@ ZYDIS_IELEMENT_TYPE_UINT
Definition: SharedData.h:115
@ ZYDIS_IELEMENT_TYPE_CC5
Definition: SharedData.h:133
@ ZYDIS_IELEMENT_TYPE_INT1
Definition: SharedData.h:116
@ ZYDIS_IELEMENT_TYPE_FLOAT32
Definition: SharedData.h:128
@ ZYDIS_IELEMENT_TYPE_INT64
Definition: SharedData.h:120
@ ZYDIS_IELEMENT_TYPE_INVALID
Definition: SharedData.h:111
@ ZYDIS_IELEMENT_TYPE_UINT128
Definition: SharedData.h:125
@ ZYDIS_IELEMENT_TYPE_CC3
Definition: SharedData.h:132
ZydisRegisterConstraint_
Defines the ZydisRegisterConstraint enum.
Definition: SharedData.h:270
@ ZYDIS_REG_CONSTRAINTS_GPR
Definition: SharedData.h:273
@ ZYDIS_REG_CONSTRAINTS_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:289
@ ZYDIS_REG_CONSTRAINTS_CR
Definition: SharedData.h:276
@ ZYDIS_REG_CONSTRAINTS_SR
Definition: SharedData.h:275
@ ZYDIS_REG_CONSTRAINTS_VSIB
Definition: SharedData.h:280
@ ZYDIS_REG_CONSTRAINTS_UNUSED
Definition: SharedData.h:271
@ ZYDIS_REG_CONSTRAINTS_BND
Definition: SharedData.h:279
@ ZYDIS_REG_CONSTRAINTS_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:285
@ ZYDIS_REG_CONSTRAINTS_NONE
Definition: SharedData.h:272
@ ZYDIS_REG_CONSTRAINTS_SR_DEST
Definition: SharedData.h:274
@ ZYDIS_REG_CONSTRAINTS_DR
Definition: SharedData.h:277
@ ZYDIS_REG_CONSTRAINTS_MASK
Definition: SharedData.h:278
ZYDIS_NO_EXPORT ZyanU8 ZydisGetOperandDefinitions(const ZydisInstructionDefinition *definition, const ZydisOperandDefinition **operand)
Returns the the operand-definitions for the given instruction-definition.
enum ZydisMaskOverride_ ZydisMaskOverride
Defines the ZydisMaskOverride enum.
struct ZydisInstructionDefinitionVEX_ ZydisInstructionDefinitionVEX
Defines the ZydisInstructionDefinitionVEX struct.
enum ZydisReadWriteAction_ ZydisReadWriteAction
Defines the ZydisReadWriteAction enum.
ZydisInternalElementSize_
Defines the ZydisInternalElementSize enum.
Definition: SharedData.h:320
@ ZYDIS_IELEMENT_SIZE_INVALID
Definition: SharedData.h:321
@ ZYDIS_IELEMENT_SIZE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:331
@ ZYDIS_IELEMENT_SIZE_128
Definition: SharedData.h:326
@ ZYDIS_IELEMENT_SIZE_32
Definition: SharedData.h:324
@ ZYDIS_IELEMENT_SIZE_16
Definition: SharedData.h:323
@ ZYDIS_IELEMENT_SIZE_64
Definition: SharedData.h:325
@ ZYDIS_IELEMENT_SIZE_8
Definition: SharedData.h:322
@ ZYDIS_IELEMENT_SIZE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:335
ZydisVEXStaticBroadcast
Defines the ZydisVEXStaticBroadcast enum.
Definition: SharedData.h:576
@ ZYDIS_VEX_STATIC_BROADCAST_1_TO_4
Definition: SharedData.h:579
@ ZYDIS_VEX_STATIC_BROADCAST_1_TO_8
Definition: SharedData.h:580
@ ZYDIS_VEX_STATIC_BROADCAST_1_TO_2
Definition: SharedData.h:578
@ ZYDIS_VEX_STATIC_BROADCAST_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:592
@ ZYDIS_VEX_STATIC_BROADCAST_1_TO_32
Definition: SharedData.h:582
@ ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:588
@ ZYDIS_VEX_STATIC_BROADCAST_1_TO_16
Definition: SharedData.h:581
@ ZYDIS_VEX_STATIC_BROADCAST_2_TO_4
Definition: SharedData.h:583
@ ZYDIS_VEX_STATIC_BROADCAST_NONE
Definition: SharedData.h:577
struct ZydisInstructionDefinition3DNOW_ ZydisInstructionDefinition3DNOW
Defines the ZydisInstructionDefinition3DNOW struct.
ZYDIS_NO_EXPORT void ZydisGetInstructionDefinition(ZydisInstructionEncoding encoding, ZyanU16 id, const ZydisInstructionDefinition **definition)
Returns the instruction-definition with the given encoding and id.
ZYDIS_NO_EXPORT ZyanBool ZydisGetAccessedFlags(const ZydisInstructionDefinition *definition, const ZydisAccessedFlags **flags)
Returns the the operand-definitions for the given instruction-definition.
enum ZydisInternalVectorLength_ ZydisInternalVectorLength
Defines the ZydisInternalVectorLength enum.
ZydisMaskOverride_
Defines the ZydisMaskOverride enum.
Definition: SharedData.h:690
@ ZYDIS_MASK_OVERRIDE_DEFAULT
Definition: SharedData.h:691
@ ZYDIS_MASK_OVERRIDE_ZEROING
Definition: SharedData.h:692
@ ZYDIS_MASK_OVERRIDE_CONTROL
Definition: SharedData.h:693
@ ZYDIS_MASK_OVERRIDE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:702
@ ZYDIS_MASK_OVERRIDE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:698
ZydisMaskPolicy_
Defines the ZydisMaskPolicy enum.
Definition: SharedData.h:658
@ ZYDIS_MASK_POLICY_INVALID
Definition: SharedData.h:659
@ ZYDIS_MASK_POLICY_FORBIDDEN
The instruction does not allow a mask-register other than the default-mask (K0).
Definition: SharedData.h:672
@ ZYDIS_MASK_POLICY_ALLOWED
The instruction accepts mask-registers other than the default-mask (K0), but does not require them.
Definition: SharedData.h:664
@ ZYDIS_MASK_POLICY_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:681
@ ZYDIS_MASK_POLICY_REQUIRED
The instruction requires a mask-register other than the default-mask (K0).
Definition: SharedData.h:668
@ ZYDIS_MASK_POLICY_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:677
enum ZydisEVEXTupleType_ ZydisEVEXTupleType
Defines the ZydisEVEXTupleType enum.
enum ZydisMVEXStaticBroadcast_ ZydisMVEXStaticBroadcast
Defines the ZydisMVEXStaticBroadcast enum.
ZYDIS_NO_EXPORT void ZydisGetElementInfo(ZydisInternalElementType element, ZydisElementType *type, ZydisElementSize *size)
Returns the actual type and size of an internal element-type.
ZydisMVEXStaticBroadcast_
Defines the ZydisMVEXStaticBroadcast enum.
Definition: SharedData.h:634
@ ZYDIS_MVEX_STATIC_BROADCAST_4_TO_8
Definition: SharedData.h:638
@ ZYDIS_MVEX_STATIC_BROADCAST_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:644
@ ZYDIS_MVEX_STATIC_BROADCAST_4_TO_16
Definition: SharedData.h:639
@ ZYDIS_MVEX_STATIC_BROADCAST_1_TO_16
Definition: SharedData.h:637
@ ZYDIS_MVEX_STATIC_BROADCAST_NONE
Definition: SharedData.h:635
@ ZYDIS_MVEX_STATIC_BROADCAST_1_TO_8
Definition: SharedData.h:636
@ ZYDIS_MVEX_STATIC_BROADCAST_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:648
struct ZydisOperandDefinition_ ZydisOperandDefinition
Defines the ZydisOperandDefinition struct.
ZydisInternalVectorLength_
Defines the ZydisInternalVectorLength enum.
Definition: SharedData.h:298
@ ZYDIS_IVECTOR_LENGTH_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:311
@ ZYDIS_IVECTOR_LENGTH_DEFAULT
Definition: SharedData.h:299
@ ZYDIS_IVECTOR_LENGTH_FIXED_256
Definition: SharedData.h:301
@ ZYDIS_IVECTOR_LENGTH_FIXED_128
Definition: SharedData.h:300
@ ZYDIS_IVECTOR_LENGTH_FIXED_512
Definition: SharedData.h:302
@ ZYDIS_IVECTOR_LENGTH_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:307
struct ZydisInstructionDefinitionMVEX_ ZydisInstructionDefinitionMVEX
Defines the ZydisInstructionDefinitionMVEX struct.
ZydisReadWriteAction_
Defines the ZydisReadWriteAction enum.
Definition: SharedData.h:248
@ ZYDIS_RW_ACTION_READ
Definition: SharedData.h:250
@ ZYDIS_RW_ACTION_NONE
Definition: SharedData.h:249
@ ZYDIS_RW_ACTION_READWRITE
Definition: SharedData.h:252
@ ZYDIS_RW_ACTION_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:261
@ ZYDIS_RW_ACTION_WRITE
Definition: SharedData.h:251
@ ZYDIS_RW_ACTION_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:257
ZydisImplicitMemBase_
Defines the ZydisImplicitMemBase enum.
Definition: SharedData.h:176
@ ZYDIS_IMPLMEM_BASE_AGPR_RM
Definition: SharedData.h:178
@ ZYDIS_IMPLMEM_BASE_AGPR_REG
Definition: SharedData.h:177
@ ZYDIS_IMPLMEM_BASE_ABP
Definition: SharedData.h:183
@ ZYDIS_IMPLMEM_BASE_ASI
Definition: SharedData.h:184
@ ZYDIS_IMPLMEM_BASE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:190
@ ZYDIS_IMPLMEM_BASE_ABX
Definition: SharedData.h:181
@ ZYDIS_IMPLMEM_BASE_AAX
Definition: SharedData.h:179
@ ZYDIS_IMPLMEM_BASE_ADI
Definition: SharedData.h:185
@ ZYDIS_IMPLMEM_BASE_ASP
Definition: SharedData.h:182
@ ZYDIS_IMPLMEM_BASE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:194
@ ZYDIS_IMPLMEM_BASE_ADX
Definition: SharedData.h:180
enum ZydisMaskPolicy_ ZydisMaskPolicy
Defines the ZydisMaskPolicy enum.
ZydisSemanticOperandType_
Defines the ZydisSemanticOperandType enum.
Definition: SharedData.h:60
@ ZYDIS_SEMANTIC_OPTYPE_MMX
Definition: SharedData.h:74
@ ZYDIS_SEMANTIC_OPTYPE_ZMM
Definition: SharedData.h:77
@ ZYDIS_SEMANTIC_OPTYPE_BND
Definition: SharedData.h:78
@ ZYDIS_SEMANTIC_OPTYPE_GPR32_32_64
Definition: SharedData.h:70
@ ZYDIS_SEMANTIC_OPTYPE_MEM
Definition: SharedData.h:83
@ ZYDIS_SEMANTIC_OPTYPE_AGEN
Definition: SharedData.h:90
@ ZYDIS_SEMANTIC_OPTYPE_CR
Definition: SharedData.h:80
@ ZYDIS_SEMANTIC_OPTYPE_DR
Definition: SharedData.h:81
@ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM
Definition: SharedData.h:63
@ ZYDIS_SEMANTIC_OPTYPE_GPR32
Definition: SharedData.h:67
@ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY
Definition: SharedData.h:85
@ ZYDIS_SEMANTIC_OPTYPE_FPR
Definition: SharedData.h:73
@ ZYDIS_SEMANTIC_OPTYPE_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:97
@ ZYDIS_SEMANTIC_OPTYPE_XMM
Definition: SharedData.h:75
@ ZYDIS_SEMANTIC_OPTYPE_GPR8
Definition: SharedData.h:65
@ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX
Definition: SharedData.h:84
@ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBZ
Definition: SharedData.h:86
@ ZYDIS_SEMANTIC_OPTYPE_GPR16
Definition: SharedData.h:66
@ ZYDIS_SEMANTIC_OPTYPE_MIB
Definition: SharedData.h:92
@ ZYDIS_SEMANTIC_OPTYPE_SREG
Definition: SharedData.h:79
@ ZYDIS_SEMANTIC_OPTYPE_IMM
Definition: SharedData.h:87
@ ZYDIS_SEMANTIC_OPTYPE_MOFFS
Definition: SharedData.h:91
@ ZYDIS_SEMANTIC_OPTYPE_GPR64
Definition: SharedData.h:68
@ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_IMM1
Definition: SharedData.h:64
@ ZYDIS_SEMANTIC_OPTYPE_GPR16_32_32
Definition: SharedData.h:71
@ ZYDIS_SEMANTIC_OPTYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:101
@ ZYDIS_SEMANTIC_OPTYPE_UNUSED
Definition: SharedData.h:61
@ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG
Definition: SharedData.h:62
@ ZYDIS_SEMANTIC_OPTYPE_GPR16_32_64
Definition: SharedData.h:69
@ ZYDIS_SEMANTIC_OPTYPE_YMM
Definition: SharedData.h:76
@ ZYDIS_SEMANTIC_OPTYPE_REL
Definition: SharedData.h:88
@ ZYDIS_SEMANTIC_OPTYPE_PTR
Definition: SharedData.h:89
@ ZYDIS_SEMANTIC_OPTYPE_MASK
Definition: SharedData.h:82
@ ZYDIS_SEMANTIC_OPTYPE_GPR_ASZ
Definition: SharedData.h:72
struct ZydisInstructionDefinitionXOP_ ZydisInstructionDefinitionXOP
Defines the ZydisInstructionDefinitionXOP struct.
ZYAN_STATIC_ASSERT(ZYDIS_SEMANTIC_OPTYPE_REQUIRED_BITS<=8)
struct ZydisAccessedFlags_ ZydisAccessedFlags
enum ZydisInternalElementType_ ZydisInternalElementType
Defines the ZydisInternalElementType enum.
enum ZydisInternalElementSize_ ZydisInternalElementSize
Defines the ZydisInternalElementSize enum.
struct ZydisInstructionDefinitionEVEX_ ZydisInstructionDefinitionEVEX
Defines the ZydisInstructionDefinitionEVEX struct.
enum ZydisRegisterConstraint_ ZydisRegisterConstraint
Defines the ZydisRegisterConstraint enum.
ZydisEVEXStaticBroadcast_
Defines the ZydisEVEXStaticBroadcast enum.
Definition: SharedData.h:602
@ ZYDIS_EVEX_STATIC_BROADCAST_1_TO_4
Definition: SharedData.h:605
@ ZYDIS_EVEX_STATIC_BROADCAST_8_TO_16
Definition: SharedData.h:615
@ ZYDIS_EVEX_STATIC_BROADCAST_1_TO_16
Definition: SharedData.h:607
@ ZYDIS_EVEX_STATIC_BROADCAST_4_TO_8
Definition: SharedData.h:613
@ ZYDIS_EVEX_STATIC_BROADCAST_2_TO_4
Definition: SharedData.h:610
@ ZYDIS_EVEX_STATIC_BROADCAST_1_TO_32
Definition: SharedData.h:608
@ ZYDIS_EVEX_STATIC_BROADCAST_4_TO_16
Definition: SharedData.h:614
@ ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE
Maximum value of this enum.
Definition: SharedData.h:620
@ ZYDIS_EVEX_STATIC_BROADCAST_1_TO_2
Definition: SharedData.h:604
@ ZYDIS_EVEX_STATIC_BROADCAST_1_TO_64
Definition: SharedData.h:609
@ ZYDIS_EVEX_STATIC_BROADCAST_2_TO_8
Definition: SharedData.h:611
@ ZYDIS_EVEX_STATIC_BROADCAST_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedData.h:624
@ ZYDIS_EVEX_STATIC_BROADCAST_1_TO_8
Definition: SharedData.h:606
@ ZYDIS_EVEX_STATIC_BROADCAST_NONE
Definition: SharedData.h:603
@ ZYDIS_EVEX_STATIC_BROADCAST_2_TO_16
Definition: SharedData.h:612
struct ZydisInstructionDefinitionLEGACY_ ZydisInstructionDefinitionLEGACY
Defines the ZydisInstructionDefinitionLEGACY struct.
Defines decoder/encoder-shared macros and types.
@ ZYDIS_OPERAND_VISIBILITY_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedTypes.h:316
enum ZydisInstructionEncoding_ ZydisInstructionEncoding
Defines the ZydisInstructionEncoding enum.
@ ZYDIS_OPERAND_ENCODING_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: SharedTypes.h:283
@ ZYDIS_OPERAND_ACTION_REQUIRED_BITS
The minimum number of bits required to represent all values of this bitset.
Definition: SharedTypes.h:391
enum ZydisElementType_ ZydisElementType
Defines the ZydisElementType enum.
ZyanU16 ZydisElementSize
Defines the ZydisElementSize datatype.
Definition: SharedTypes.h:189
Definition: SharedData.h:878
ZydisCPUFlagAction action[ZYDIS_CPUFLAG_MAX_VALUE+1]
Definition: SharedData.h:879
Defines the ZydisInstructionDefinition3DNOW struct.
Definition: SharedData.h:790
ZYDIS_INSTRUCTION_DEFINITION_BASE
Definition: SharedData.h:791
Defines the ZydisInstructionDefinitionEVEX struct.
Definition: SharedData.h:833
ZyanU8 tuple_type ZYAN_BITFIELD(ZYDIS_TUPLETYPE_REQUIRED_BITS)
ZyanU8 functionality ZYAN_BITFIELD(ZYDIS_EVEX_FUNC_REQUIRED_BITS)
ZyanU8 mask_override ZYAN_BITFIELD(ZYDIS_MASK_OVERRIDE_REQUIRED_BITS)
ZyanU8 vector_length ZYAN_BITFIELD(ZYDIS_IVECTOR_LENGTH_REQUIRED_BITS)
ZyanBool accepts_zero_mask ZYAN_BITFIELD(1)
ZyanU8 broadcast ZYAN_BITFIELD(ZYDIS_EVEX_STATIC_BROADCAST_REQUIRED_BITS)
ZyanU8 element_size ZYAN_BITFIELD(ZYDIS_IELEMENT_SIZE_REQUIRED_BITS)
ZyanU8 mask_policy ZYAN_BITFIELD(ZYDIS_MASK_POLICY_REQUIRED_BITS)
ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR_INTEL
Definition: SharedData.h:834
Defines the ZydisInstructionDefinitionLEGACY struct.
Definition: SharedData.h:767
ZyanBool accepts_segment ZYAN_BITFIELD(1)
ZyanBool accepts_branch_hints ZYAN_BITFIELD(1)
ZyanBool accepts_XACQUIRE ZYAN_BITFIELD(1)
ZyanBool accepts_XRELEASE ZYAN_BITFIELD(1)
ZYDIS_INSTRUCTION_DEFINITION_BASE
Definition: SharedData.h:768
ZyanBool accepts_REPNEREPNZ ZYAN_BITFIELD(1)
ZyanBool accepts_BOUND ZYAN_BITFIELD(1)
ZyanBool accepts_LOCK ZYAN_BITFIELD(1)
ZyanBool accepts_REP ZYAN_BITFIELD(1)
ZyanBool accepts_REPEREPZ ZYAN_BITFIELD(1)
ZyanBool accepts_hle_without_lock ZYAN_BITFIELD(1)
ZyanBool is_privileged ZYAN_BITFIELD(1)
Defines the ZydisInstructionDefinitionMVEX struct.
Definition: SharedData.h:862
ZyanBool has_element_granularity ZYAN_BITFIELD(1)
ZyanU8 broadcast ZYAN_BITFIELD(ZYDIS_MVEX_STATIC_BROADCAST_REQUIRED_BITS)
ZyanU8 functionality ZYAN_BITFIELD(ZYDIS_MVEX_FUNC_REQUIRED_BITS)
ZyanU8 mask_policy ZYAN_BITFIELD(ZYDIS_MASK_POLICY_REQUIRED_BITS)
ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR_INTEL
Definition: SharedData.h:863
Defines the ZydisInstructionDefinitionVEX struct.
Definition: SharedData.h:810
ZyanU8 broadcast ZYAN_BITFIELD(ZYDIS_VEX_STATIC_BROADCAST_REQUIRED_BITS)
ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR_INTEL
Definition: SharedData.h:811
Defines the ZydisInstructionDefinitionXOP struct.
Definition: SharedData.h:798
ZYDIS_INSTRUCTION_DEFINITION_BASE_VECTOR
Definition: SharedData.h:799
Defines the ZydisInstructionDefinition struct.
Definition: SharedData.h:759
ZYDIS_INSTRUCTION_DEFINITION_BASE
Definition: SharedData.h:760
Defines the ZydisOperandDefinition struct.
Definition: SharedData.h:214
ZyanU8 type ZYAN_BITFIELD(ZYDIS_SEMANTIC_OPTYPE_REQUIRED_BITS)
union ZydisOperandDefinition_::@3 op
ZyanU8 element_type ZYAN_BITFIELD(ZYDIS_IELEMENT_TYPE_REQUIRED_BITS)
struct ZydisOperandDefinition_::@3::@5 mem
ZyanU8 actions ZYAN_BITFIELD(ZYDIS_OPERAND_ACTION_REQUIRED_BITS)
ZyanU8 visibility ZYAN_BITFIELD(ZYDIS_OPERAND_VISIBILITY_REQUIRED_BITS)
ZyanU16 size[3]
Definition: SharedData.h:218
union ZydisOperandDefinition_::@3::@4::@6 reg