Zydis  master
DecoderTypes.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 
32 #ifndef ZYDIS_INSTRUCTIONINFO_H
33 #define ZYDIS_INSTRUCTIONINFO_H
34 
35 #include <Zycore/Types.h>
36 #include <Zydis/MetaInfo.h>
37 #include <Zydis/Mnemonic.h>
38 #include <Zydis/Register.h>
39 #include <Zydis/SharedTypes.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /* ============================================================================================== */
46 /* Decoded operand */
47 /* ============================================================================================== */
48 
49 /* ---------------------------------------------------------------------------------------------- */
50 /* Operand attributes */
51 /* ---------------------------------------------------------------------------------------------- */
52 
56 typedef ZyanU8 ZydisOperandAttributes;
57 
66 #define ZYDIS_OATTRIB_IS_MULTISOURCE4 (1 << 0)
67 
68 /* ---------------------------------------------------------------------------------------------- */
69 /* Memory type */
70 /* ---------------------------------------------------------------------------------------------- */
71 
76 {
96 
106 
107 /* ---------------------------------------------------------------------------------------------- */
108 /* Decoded operand */
109 /* ---------------------------------------------------------------------------------------------- */
110 
115 {
121 
126 {
146  ZyanU8 scale;
151  {
155  ZyanI64 value;
160  ZyanU8 offset;
164  ZyanU8 size;
165  } disp;
167 
172 {
173  ZyanU16 segment;
174  ZyanU32 offset;
176 
181 {
185  ZyanBool is_signed;
189  ZyanBool is_address;
194  ZyanBool is_relative;
199  {
200  ZyanU64 u;
201  ZyanI64 s;
202  } value;
207  ZyanU8 offset;
211  ZyanU8 size;
213 
217 typedef struct ZydisDecodedOperand_
218 {
222  ZyanU8 id;
238  ZyanU16 size;
250  ZyanU16 element_count;
251  /*
252  * Additional operand attributes.
253  */
259  /*
260  * Operand type specific information.
261  *
262  * The enabled union variant is determined by the `type` field.
263  */
264  union
265  {
270  };
272 
273 /* ---------------------------------------------------------------------------------------------- */
274 
275 /* ============================================================================================== */
276 /* Decoded instruction */
277 /* ============================================================================================== */
278 
279 /* ---------------------------------------------------------------------------------------------- */
280 /* CPU/FPU flags */
281 /* ---------------------------------------------------------------------------------------------- */
282 
286 typedef ZyanU32 ZydisAccessedFlagsMask;
287 
300 #define ZYDIS_CPUFLAG_CF (1ul << 0)
304 #define ZYDIS_CPUFLAG_PF (1ul << 2)
308 #define ZYDIS_CPUFLAG_AF (1ul << 4)
312 #define ZYDIS_CPUFLAG_ZF (1ul << 6)
316 #define ZYDIS_CPUFLAG_SF (1ul << 7)
320 #define ZYDIS_CPUFLAG_TF (1ul << 8)
324 #define ZYDIS_CPUFLAG_IF (1ul << 9)
328 #define ZYDIS_CPUFLAG_DF (1ul << 10)
332 #define ZYDIS_CPUFLAG_OF (1ul << 11)
336 #define ZYDIS_CPUFLAG_IOPL (1ul << 12)
340 #define ZYDIS_CPUFLAG_NT (1ul << 14)
344 #define ZYDIS_CPUFLAG_RF (1ul << 16)
348 #define ZYDIS_CPUFLAG_VM (1ul << 17)
352 #define ZYDIS_CPUFLAG_AC (1ul << 18)
356 #define ZYDIS_CPUFLAG_VIF (1ul << 19)
360 #define ZYDIS_CPUFLAG_VIP (1ul << 20)
364 #define ZYDIS_CPUFLAG_ID (1ul << 21)
365 
382 #define ZYDIS_FPUFLAG_C0 (1ul << 0)
386 #define ZYDIS_FPUFLAG_C1 (1ul << 1)
390 #define ZYDIS_FPUFLAG_C2 (1ul << 2)
394 #define ZYDIS_FPUFLAG_C3 (1ul << 3)
395 
400 /*
401  * Information about CPU/FPU flags accessed by the instruction.
402  */
403 typedef struct ZydisAccessedFlags_
404 {
405  /*
406  * As mask containing the flags `TESTED` by the instruction.
407  */
409  /*
410  * As mask containing the flags `MODIFIED` by the instruction.
411  */
413  /*
414  * As mask containing the flags `SET_0` by the instruction.
415  */
417  /*
418  * As mask containing the flags `SET_1` by the instruction.
419  */
421  /*
422  * As mask containing the flags `UNDEFINED` by the instruction.
423  */
426 
427 /* ---------------------------------------------------------------------------------------------- */
428 /* Branch types */
429 /* ---------------------------------------------------------------------------------------------- */
430 
434 typedef enum ZydisBranchType_
435 {
456 
466 
467 /* ---------------------------------------------------------------------------------------------- */
468 /* SSE/AVX exception-class */
469 /* ---------------------------------------------------------------------------------------------- */
470 
475 {
477  // TODO: FP Exceptions
549 
559 
560 /* ---------------------------------------------------------------------------------------------- */
561 /* AVX mask mode */
562 /* ---------------------------------------------------------------------------------------------- */
563 
567 typedef enum ZydisMaskMode_
568 {
590 
600 
601 /* ---------------------------------------------------------------------------------------------- */
602 /* AVX broadcast-mode */
603 /* ---------------------------------------------------------------------------------------------- */
604 
609 {
623 
633 
634 /* ---------------------------------------------------------------------------------------------- */
635 /* AVX rounding-mode */
636 /* ---------------------------------------------------------------------------------------------- */
637 
641 typedef enum ZydisRoundingMode_
642 {
660 
670 
671 /* ---------------------------------------------------------------------------------------------- */
672 /* KNC swizzle-mode */
673 /* ---------------------------------------------------------------------------------------------- */
674 
678 typedef enum ZydisSwizzleMode_
679 {
689 
699 
700 /* ---------------------------------------------------------------------------------------------- */
701 /* KNC conversion-mode */
702 /* ---------------------------------------------------------------------------------------------- */
703 
708 {
715 
725 
726 /* ---------------------------------------------------------------------------------------------- */
727 /* APX default flags value */
728 /* ---------------------------------------------------------------------------------------------- */
729 
733 typedef ZyanU8 ZydisDefaultFlagsValue;
734 
748 #define ZYDIS_DFV_CF (1u << 0)
752 #define ZYDIS_DFV_ZF (1u << 1)
756 #define ZYDIS_DFV_SF (1u << 2)
760 #define ZYDIS_DFV_OF (1u << 3)
761 
765 #define ZYDIS_DFV_NONE 0
769 #define ZYDIS_DFV_ALL (ZYDIS_DFV_CF | ZYDIS_DFV_ZF | ZYDIS_DFV_SF | ZYDIS_DFV_OF)
770 
775 /* ---------------------------------------------------------------------------------------------- */
776 /* APX source condition code */
777 /* ---------------------------------------------------------------------------------------------- */
778 
783 {
801 
809  ZYDIS_SCC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SCC_MAX_VALUE)
811 
812 /* ---------------------------------------------------------------------------------------------- */
813 /* Legacy prefix type */
814 /* ---------------------------------------------------------------------------------------------- */
815 
819 typedef enum ZydisPrefixType_
820 {
839 
849 
850 // TODO: Check effective for 66/67 prefixes (currently defaults to EFFECTIVE)
851 
852 /* ---------------------------------------------------------------------------------------------- */
853 /* Decoded instruction */
854 /* ---------------------------------------------------------------------------------------------- */
855 
860 {
864  ZyanU8 W;
868  ZyanU8 R;
872  ZyanU8 X;
876  ZyanU8 B;
888  ZyanU8 offset;
890 
895 {
899  ZyanU8 M0;
903  ZyanU8 R4;
907  ZyanU8 X4;
911  ZyanU8 B4;
915  ZyanU8 W;
919  ZyanU8 R3;
923  ZyanU8 X3;
927  ZyanU8 B3;
936  ZyanU8 offset;
938 
943 {
947  ZyanU8 R;
951  ZyanU8 X;
955  ZyanU8 B;
959  ZyanU8 m_mmmm;
963  ZyanU8 W;
968  ZyanU8 vvvv;
972  ZyanU8 L;
976  ZyanU8 pp;
981  ZyanU8 offset;
983 
988 {
992  ZyanU8 R;
996  ZyanU8 X;
1000  ZyanU8 B;
1004  ZyanU8 m_mmmm;
1008  ZyanU8 W;
1013  ZyanU8 vvvv;
1017  ZyanU8 L;
1021  ZyanU8 pp;
1026  ZyanU8 offset;
1030  ZyanU8 size;
1032 
1037 {
1041  ZyanU8 R3;
1045  ZyanU8 X3;
1049  ZyanU8 B3;
1053  ZyanU8 R4;
1057  ZyanU8 B4;
1061  ZyanU8 mmm;
1065  ZyanU8 W;
1070  ZyanU8 vvvv;
1074  ZyanU8 U;
1078  ZyanU8 X4;
1082  ZyanU8 pp;
1086  ZyanU8 z;
1090  ZyanU8 L2;
1094  ZyanU8 L;
1098  ZyanU8 b;
1102  ZyanU8 V4;
1106  ZyanU8 aaa;
1107 
1108  ZyanU8 ND;
1109  ZyanU8 NF;
1110  ZyanU8 SCC;
1111 
1116  ZyanU8 offset;
1118 
1123 {
1127  ZyanU8 R;
1131  ZyanU8 X;
1135  ZyanU8 B;
1139  ZyanU8 R2;
1143  ZyanU8 mmmm;
1147  ZyanU8 W;
1152  ZyanU8 vvvv;
1156  ZyanU8 pp;
1160  ZyanU8 E;
1164  ZyanU8 SSS;
1168  ZyanU8 V2;
1172  ZyanU8 kkk;
1177  ZyanU8 offset;
1179 
1184 {
1188  ZyanU16 vector_length;
1193  {
1202  } mask;
1207  {
1214  ZyanBool is_static;
1224  {
1234  {
1244  {
1254  ZyanBool has_sae;
1259  // TODO: publish EVEX tuple-type and MVEX functionality
1261 
1266 {
1270  ZyanBool uses_egpr;
1274  ZyanBool has_nf;
1278  ZyanBool has_zu;
1284  ZyanBool has_ppx;
1297 
1302 {
1324 
1330 {
1339  {
1347  ZyanU8 value;
1349 
1350  /*
1351  * Copy of the `encoding` field.
1352  *
1353  * This is here to allow the Rust bindings to treat the following union as an `enum`,
1354  * sparing us a lot of unsafe code. Prefer using the regular `encoding` field in C/C++ code.
1355  */
1357  /*
1358  * Union for things from various mutually exclusive encodings.
1359  */
1360  union
1361  {
1368  };
1369 
1374  {
1378  ZyanU8 mod;
1382  ZyanU8 reg;
1386  ZyanU8 rm;
1391  ZyanU8 offset;
1397  {
1401  ZyanU8 scale;
1405  ZyanU8 index;
1409  ZyanU8 base;
1414  ZyanU8 offset;
1415  } sib;
1420  {
1424  ZyanI64 value;
1428  ZyanU8 size;
1429  // TODO: publish cd8 scale
1434  ZyanU8 offset;
1435  } disp;
1440  {
1444  ZyanBool is_signed;
1448  ZyanBool is_address;
1453  ZyanBool is_relative;
1458  {
1459  ZyanU64 u;
1460  ZyanI64 s;
1465  ZyanU8 size;
1470  ZyanU8 offset;
1471  } imm[2];
1473 
1478 {
1490  ZyanU8 length;
1502  ZyanU8 opcode;
1506  ZyanU8 stack_width;
1565 
1566 /* ---------------------------------------------------------------------------------------------- */
1567 /* Decoder context */
1568 /* ---------------------------------------------------------------------------------------------- */
1569 
1582 typedef struct ZydisDecoderContext_
1583 {
1587  const void* definition;
1593  ZyanU8 eosz_index;
1599  ZyanU8 easz_index;
1603  struct
1604  {
1605  ZyanU8 W;
1606  ZyanU8 R3;
1607  ZyanU8 R4;
1608  ZyanU8 X3;
1609  ZyanU8 X4;
1610  ZyanU8 B3;
1611  ZyanU8 B4;
1612  ZyanU8 L;
1613  ZyanU8 LL;
1614  ZyanU8 V4;
1615  ZyanU8 vvvv;
1616  ZyanU8 mask;
1621  struct
1622  {
1626  ZyanBool is_mod_reg;
1630  ZyanU8 id_reg;
1636  ZyanU8 id_rm;
1640  ZyanU8 id_ndsndd;
1646  ZyanU8 id_base;
1653  ZyanU8 id_index;
1658  struct
1659  {
1663  ZyanU8 tuple_type;
1668  } evex;
1672  struct
1673  {
1678  } mvex;
1682  ZyanU8 cd8_scale; // TODO: Could make sense to expose this in the ZydisDecodedInstruction
1684 
1685 /* ---------------------------------------------------------------------------------------------- */
1686 
1687 /* ============================================================================================== */
1688 
1689 #ifdef __cplusplus
1690 }
1691 #endif
1692 
1693 #endif /* ZYDIS_INSTRUCTIONINFO_H */
struct ZydisDecodedInstructionRawRex_ ZydisDecodedInstructionRawRex
Detailed info about the REX prefix.
enum ZydisConversionMode_ ZydisConversionMode
Defines the ZydisConversionMode enum.
enum ZydisMaskMode_ ZydisMaskMode
Defines the ZydisMaskMode enum.
struct ZydisDecodedInstructionRawRex2_ ZydisDecodedInstructionRawRex2
Detailed info about the REX2 prefix.
struct ZydisDecodedInstructionRawMvex_ ZydisDecodedInstructionRawMvex
Detailed info about the MVEX prefix.
enum ZydisRoundingMode_ ZydisRoundingMode
Defines the ZydisRoundingMode enum.
struct ZydisDecodedOperandPtr_ ZydisDecodedOperandPtr
Extended info for pointer-operands.
struct ZydisDecodedOperandImm_ ZydisDecodedOperandImm
Extended info for immediate-operands.
ZydisExceptionClass_
Defines the ZydisExceptionClass enum.
Definition: DecoderTypes.h:475
@ ZYDIS_EXCEPTION_CLASS_E5
Definition: DecoderTypes.h:503
@ ZYDIS_EXCEPTION_CLASS_AVX4
Definition: DecoderTypes.h:487
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_CET_WRUSS
Definition: DecoderTypes.h:544
@ ZYDIS_EXCEPTION_CLASS_E1NF
Definition: DecoderTypes.h:496
@ ZYDIS_EXCEPTION_CLASS_AVX7
Definition: DecoderTypes.h:490
@ ZYDIS_EXCEPTION_CLASS_E7NM128
Definition: DecoderTypes.h:508
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_CMPCCXADD
Definition: DecoderTypes.h:535
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_CET_WRSS
Definition: DecoderTypes.h:543
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_ENQCMD
Definition: DecoderTypes.h:536
@ ZYDIS_EXCEPTION_CLASS_AVX11
Definition: DecoderTypes.h:492
@ ZYDIS_EXCEPTION_CLASS_E12NP
Definition: DecoderTypes.h:515
@ ZYDIS_EXCEPTION_CLASS_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:553
@ ZYDIS_EXCEPTION_CLASS_AMXE6
Definition: DecoderTypes.h:523
@ ZYDIS_EXCEPTION_CLASS_AVX3
Definition: DecoderTypes.h:486
@ ZYDIS_EXCEPTION_CLASS_APX_LEGACY_JMPABS
Definition: DecoderTypes.h:545
@ ZYDIS_EXCEPTION_CLASS_AMXE1
Definition: DecoderTypes.h:518
@ ZYDIS_EXCEPTION_CLASS_AMXE3
Definition: DecoderTypes.h:520
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_SHA
Definition: DecoderTypes.h:542
@ ZYDIS_EXCEPTION_CLASS_AVX5
Definition: DecoderTypes.h:488
@ ZYDIS_EXCEPTION_CLASS_SSE2
Definition: DecoderTypes.h:479
@ ZYDIS_EXCEPTION_CLASS_SSE3
Definition: DecoderTypes.h:480
@ ZYDIS_EXCEPTION_CLASS_E10
Definition: DecoderTypes.h:510
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_INT
Definition: DecoderTypes.h:530
@ ZYDIS_EXCEPTION_CLASS_E3
Definition: DecoderTypes.h:499
@ ZYDIS_EXCEPTION_CLASS_E1
Definition: DecoderTypes.h:495
@ ZYDIS_EXCEPTION_CLASS_SSE5
Definition: DecoderTypes.h:482
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_CFCMOV
Definition: DecoderTypes.h:534
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_INVVPID
Definition: DecoderTypes.h:539
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_INVPCID
Definition: DecoderTypes.h:538
@ ZYDIS_EXCEPTION_CLASS_SSE7
Definition: DecoderTypes.h:483
@ ZYDIS_EXCEPTION_CLASS_AVX6
Definition: DecoderTypes.h:489
@ ZYDIS_EXCEPTION_CLASS_K20
Definition: DecoderTypes.h:516
@ ZYDIS_EXCEPTION_CLASS_E9NF
Definition: DecoderTypes.h:509
@ ZYDIS_EXCEPTION_CLASS_SSE4
Definition: DecoderTypes.h:481
@ ZYDIS_EXCEPTION_CLASS_E3NF
Definition: DecoderTypes.h:500
@ ZYDIS_EXCEPTION_CLASS_AMXE2_EVEX
Definition: DecoderTypes.h:525
@ ZYDIS_EXCEPTION_CLASS_E11
Definition: DecoderTypes.h:512
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_BMI
Definition: DecoderTypes.h:532
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_CCMP
Definition: DecoderTypes.h:533
@ ZYDIS_EXCEPTION_CLASS_E4
Definition: DecoderTypes.h:501
@ ZYDIS_EXCEPTION_CLASS_LEGACY_RAO_INT
Definition: DecoderTypes.h:548
@ ZYDIS_EXCEPTION_CLASS_E12
Definition: DecoderTypes.h:514
@ ZYDIS_EXCEPTION_CLASS_K21
Definition: DecoderTypes.h:517
@ ZYDIS_EXCEPTION_CLASS_USER_MSR_EVEX
Definition: DecoderTypes.h:547
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_PP2
Definition: DecoderTypes.h:541
@ ZYDIS_EXCEPTION_CLASS_AMXE1_EVEX
Definition: DecoderTypes.h:524
@ ZYDIS_EXCEPTION_CLASS_AMXE5_EVEX
Definition: DecoderTypes.h:528
@ ZYDIS_EXCEPTION_CLASS_E6NF
Definition: DecoderTypes.h:506
@ ZYDIS_EXCEPTION_CLASS_AMXE3_EVEX
Definition: DecoderTypes.h:526
@ ZYDIS_EXCEPTION_CLASS_AVX2
Definition: DecoderTypes.h:485
@ ZYDIS_EXCEPTION_CLASS_E2NF
Definition: DecoderTypes.h:498
@ ZYDIS_EXCEPTION_CLASS_SSE1
Definition: DecoderTypes.h:478
@ ZYDIS_EXCEPTION_CLASS_E5NF
Definition: DecoderTypes.h:504
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_KMOV
Definition: DecoderTypes.h:540
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_RAO_INT
Definition: DecoderTypes.h:546
@ ZYDIS_EXCEPTION_CLASS_NONE
Definition: DecoderTypes.h:476
@ ZYDIS_EXCEPTION_CLASS_AMXE6_EVEX
Definition: DecoderTypes.h:529
@ ZYDIS_EXCEPTION_CLASS_E6
Definition: DecoderTypes.h:505
@ ZYDIS_EXCEPTION_CLASS_E10NF
Definition: DecoderTypes.h:511
@ ZYDIS_EXCEPTION_CLASS_AMXE5
Definition: DecoderTypes.h:522
@ ZYDIS_EXCEPTION_CLASS_AVX14
Definition: DecoderTypes.h:494
@ ZYDIS_EXCEPTION_CLASS_AVX8
Definition: DecoderTypes.h:491
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_KEYLOCKER
Definition: DecoderTypes.h:531
@ ZYDIS_EXCEPTION_CLASS_APX_EVEX_INVEPT
Definition: DecoderTypes.h:537
@ ZYDIS_EXCEPTION_CLASS_AMXE4_EVEX
Definition: DecoderTypes.h:527
@ ZYDIS_EXCEPTION_CLASS_AMXE4
Definition: DecoderTypes.h:521
@ ZYDIS_EXCEPTION_CLASS_E4NF
Definition: DecoderTypes.h:502
@ ZYDIS_EXCEPTION_CLASS_E11NF
Definition: DecoderTypes.h:513
@ ZYDIS_EXCEPTION_CLASS_AMXE2
Definition: DecoderTypes.h:519
@ ZYDIS_EXCEPTION_CLASS_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:557
@ ZYDIS_EXCEPTION_CLASS_E2
Definition: DecoderTypes.h:497
@ ZYDIS_EXCEPTION_CLASS_AVX1
Definition: DecoderTypes.h:484
@ ZYDIS_EXCEPTION_CLASS_E7NM
Definition: DecoderTypes.h:507
@ ZYDIS_EXCEPTION_CLASS_AVX12
Definition: DecoderTypes.h:493
ZydisBranchType_
Defines the ZydisBranchType enum.
Definition: DecoderTypes.h:435
@ ZYDIS_BRANCH_TYPE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:460
@ ZYDIS_BRANCH_TYPE_FAR
The instruction is a far (inter-segment) branch instruction.
Definition: DecoderTypes.h:451
@ ZYDIS_BRANCH_TYPE_NONE
The instruction is not a branch instruction.
Definition: DecoderTypes.h:439
@ ZYDIS_BRANCH_TYPE_NEAR
The instruction is a near (16-bit or 32-bit) branch instruction.
Definition: DecoderTypes.h:447
@ ZYDIS_BRANCH_TYPE_SHORT
The instruction is a short (8-bit) branch instruction.
Definition: DecoderTypes.h:443
@ ZYDIS_BRANCH_TYPE_ABSOLUTE
The instruction is an absolute 64-bit branch instruction.
Definition: DecoderTypes.h:455
@ ZYDIS_BRANCH_TYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:464
struct ZydisDecodedOperandReg_ ZydisDecodedOperandReg
Extended info for register-operands.
struct ZydisDecoderContext_ ZydisDecoderContext
The decoder context is used to preserve some internal state between subsequent decode operations for ...
ZyanU32 ZydisAccessedFlagsMask
Defines the ZydisAccessedFlagsMask data-type.
Definition: DecoderTypes.h:286
ZydisBroadcastMode_
Defines the ZydisBroadcastMode enum.
Definition: DecoderTypes.h:609
@ ZYDIS_BROADCAST_MODE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:631
@ ZYDIS_BROADCAST_MODE_1_TO_8
Definition: DecoderTypes.h:613
@ ZYDIS_BROADCAST_MODE_1_TO_2
Definition: DecoderTypes.h:611
@ ZYDIS_BROADCAST_MODE_1_TO_64
Definition: DecoderTypes.h:616
@ ZYDIS_BROADCAST_MODE_2_TO_8
Definition: DecoderTypes.h:618
@ ZYDIS_BROADCAST_MODE_NONE
Definition: DecoderTypes.h:610
@ ZYDIS_BROADCAST_MODE_4_TO_16
Definition: DecoderTypes.h:621
@ ZYDIS_BROADCAST_MODE_4_TO_8
Definition: DecoderTypes.h:620
@ ZYDIS_BROADCAST_MODE_1_TO_16
Definition: DecoderTypes.h:614
@ ZYDIS_BROADCAST_MODE_1_TO_4
Definition: DecoderTypes.h:612
@ ZYDIS_BROADCAST_MODE_2_TO_4
Definition: DecoderTypes.h:617
@ ZYDIS_BROADCAST_MODE_2_TO_16
Definition: DecoderTypes.h:619
@ ZYDIS_BROADCAST_MODE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:627
@ ZYDIS_BROADCAST_MODE_1_TO_32
Definition: DecoderTypes.h:615
@ ZYDIS_BROADCAST_MODE_8_TO_16
Definition: DecoderTypes.h:622
enum ZydisExceptionClass_ ZydisExceptionClass
Defines the ZydisExceptionClass enum.
ZydisPrefixType_
Defines the ZydisPrefixType enum.
Definition: DecoderTypes.h:820
@ ZYDIS_PREFIX_TYPE_IGNORED
The prefix is ignored by the instruction.
Definition: DecoderTypes.h:827
@ ZYDIS_PREFIX_TYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:847
@ ZYDIS_PREFIX_TYPE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:843
@ ZYDIS_PREFIX_TYPE_MANDATORY
The prefix is used as a mandatory prefix.
Definition: DecoderTypes.h:838
@ ZYDIS_PREFIX_TYPE_EFFECTIVE
The prefix is effectively used by the instruction.
Definition: DecoderTypes.h:831
ZydisMemoryOperandType_
Defines the ZydisMemoryOperandType enum.
Definition: DecoderTypes.h:76
@ ZYDIS_MEMOP_TYPE_AGEN
The memory operand is only used for address-generation.
Definition: DecoderTypes.h:86
@ ZYDIS_MEMOP_TYPE_MEM
Normal memory operand.
Definition: DecoderTypes.h:81
@ ZYDIS_MEMOP_TYPE_MIB
A memory operand using SIB addressing form, where the index register is not used in address calculati...
Definition: DecoderTypes.h:91
@ ZYDIS_MEMOP_TYPE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:104
@ ZYDIS_MEMOP_TYPE_VSIB
A vector SIB memory addressing operand (VSIB).
Definition: DecoderTypes.h:95
@ ZYDIS_MEMOP_TYPE_INVALID
Definition: DecoderTypes.h:77
@ ZYDIS_MEMOP_TYPE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:100
struct ZydisDecodedInstructionRawEvex_ ZydisDecodedInstructionRawEvex
Detailed info about the EVEX prefix.
ZydisRoundingMode_
Defines the ZydisRoundingMode enum.
Definition: DecoderTypes.h:642
@ ZYDIS_ROUNDING_MODE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:668
@ ZYDIS_ROUNDING_MODE_RN
Round to nearest.
Definition: DecoderTypes.h:647
@ ZYDIS_ROUNDING_MODE_RZ
Round towards zero.
Definition: DecoderTypes.h:659
@ ZYDIS_ROUNDING_MODE_RD
Round down.
Definition: DecoderTypes.h:651
@ ZYDIS_ROUNDING_MODE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:664
@ ZYDIS_ROUNDING_MODE_RU
Round up.
Definition: DecoderTypes.h:655
@ ZYDIS_ROUNDING_MODE_NONE
Definition: DecoderTypes.h:643
struct ZydisDecodedInstructionRawXop_ ZydisDecodedInstructionRawXop
Detailed info about the XOP prefix.
enum ZydisSwizzleMode_ ZydisSwizzleMode
Defines the ZydisSwizzleMode enum.
enum ZydisMemoryOperandType_ ZydisMemoryOperandType
Defines the ZydisMemoryOperandType enum.
struct ZydisDecodedInstructionRaw_ ZydisDecodedInstructionRaw
Detailed info about different instruction-parts like ModRM, SIB or encoding-prefixes.
ZydisConversionMode_
Defines the ZydisConversionMode enum.
Definition: DecoderTypes.h:708
@ ZYDIS_CONVERSION_MODE_SINT8
Definition: DecoderTypes.h:711
@ ZYDIS_CONVERSION_MODE_NONE
Definition: DecoderTypes.h:709
@ ZYDIS_CONVERSION_MODE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:723
@ ZYDIS_CONVERSION_MODE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:719
@ ZYDIS_CONVERSION_MODE_SINT16
Definition: DecoderTypes.h:713
@ ZYDIS_CONVERSION_MODE_UINT16
Definition: DecoderTypes.h:714
@ ZYDIS_CONVERSION_MODE_FLOAT16
Definition: DecoderTypes.h:710
@ ZYDIS_CONVERSION_MODE_UINT8
Definition: DecoderTypes.h:712
ZyanU8 ZydisOperandAttributes
Defines the ZydisOperandAttributes data-type.
Definition: DecoderTypes.h:56
struct ZydisDecodedOperand_ ZydisDecodedOperand
Defines the ZydisDecodedOperand struct.
struct ZydisDecodedInstructionMeta_ ZydisDecodedInstructionMeta
Instruction meta info.
enum ZydisSourceConditionCode_ ZydisSourceConditionCode
Defines the ZydisSourceConditionCode enum.
struct ZydisDecodedOperandMem_ ZydisDecodedOperandMem
Extended info for memory-operands.
ZydisSourceConditionCode_
Defines the ZydisSourceConditionCode enum.
Definition: DecoderTypes.h:783
@ ZYDIS_SCC_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:809
@ ZYDIS_SCC_NONE
Definition: DecoderTypes.h:784
@ ZYDIS_SCC_S
Definition: DecoderTypes.h:793
@ ZYDIS_SCC_NBE
Definition: DecoderTypes.h:792
@ ZYDIS_SCC_O
Definition: DecoderTypes.h:785
@ ZYDIS_SCC_NO
Definition: DecoderTypes.h:786
@ ZYDIS_SCC_B
Definition: DecoderTypes.h:787
@ ZYDIS_SCC_BE
Definition: DecoderTypes.h:791
@ ZYDIS_SCC_NLE
Definition: DecoderTypes.h:800
@ ZYDIS_SCC_NB
Definition: DecoderTypes.h:788
@ ZYDIS_SCC_FALSE
Definition: DecoderTypes.h:796
@ ZYDIS_SCC_L
Definition: DecoderTypes.h:797
@ ZYDIS_SCC_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:805
@ ZYDIS_SCC_LE
Definition: DecoderTypes.h:799
@ ZYDIS_SCC_NL
Definition: DecoderTypes.h:798
@ ZYDIS_SCC_TRUE
Definition: DecoderTypes.h:795
@ ZYDIS_SCC_Z
Definition: DecoderTypes.h:789
@ ZYDIS_SCC_NZ
Definition: DecoderTypes.h:790
@ ZYDIS_SCC_NS
Definition: DecoderTypes.h:794
enum ZydisBroadcastMode_ ZydisBroadcastMode
Defines the ZydisBroadcastMode enum.
enum ZydisPrefixType_ ZydisPrefixType
Defines the ZydisPrefixType enum.
struct ZydisDecodedInstruction_ ZydisDecodedInstruction
Information about a decoded instruction.
ZydisMaskMode_
Defines the ZydisMaskMode enum.
Definition: DecoderTypes.h:568
@ ZYDIS_MASK_MODE_NONE
Definition: DecoderTypes.h:569
@ ZYDIS_MASK_MODE_DISABLED
Masking is disabled for the current instruction (K0 register is used).
Definition: DecoderTypes.h:573
@ ZYDIS_MASK_MODE_CONTROL
The embedded mask register is used as a control-mask (element selector).
Definition: DecoderTypes.h:585
@ ZYDIS_MASK_MODE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:594
@ ZYDIS_MASK_MODE_MERGING
The embedded mask register is used as a merge-mask.
Definition: DecoderTypes.h:577
@ ZYDIS_MASK_MODE_CONTROL_ZEROING
The embedded mask register is used as a zeroing control-mask (element selector).
Definition: DecoderTypes.h:589
@ ZYDIS_MASK_MODE_ZEROING
The embedded mask register is used as a zero-mask.
Definition: DecoderTypes.h:581
@ ZYDIS_MASK_MODE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:598
struct ZydisAccessedFlags_ ZydisAccessedFlags
ZyanU8 ZydisDefaultFlagsValue
Defines the ZydisDefaultFlagsValue data-type.
Definition: DecoderTypes.h:733
enum ZydisBranchType_ ZydisBranchType
Defines the ZydisBranchType enum.
struct ZydisDecodedInstructionApx_ ZydisDecodedInstructionApx
Extended info for APX instructions.
ZydisSwizzleMode_
Defines the ZydisSwizzleMode enum.
Definition: DecoderTypes.h:679
@ ZYDIS_SWIZZLE_MODE_MAX_VALUE
Maximum value of this enum.
Definition: DecoderTypes.h:693
@ ZYDIS_SWIZZLE_MODE_DACB
Definition: DecoderTypes.h:684
@ ZYDIS_SWIZZLE_MODE_BADC
Definition: DecoderTypes.h:683
@ ZYDIS_SWIZZLE_MODE_AAAA
Definition: DecoderTypes.h:685
@ ZYDIS_SWIZZLE_MODE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: DecoderTypes.h:697
@ ZYDIS_SWIZZLE_MODE_DCBA
Definition: DecoderTypes.h:681
@ ZYDIS_SWIZZLE_MODE_BBBB
Definition: DecoderTypes.h:686
@ ZYDIS_SWIZZLE_MODE_NONE
Definition: DecoderTypes.h:680
@ ZYDIS_SWIZZLE_MODE_CCCC
Definition: DecoderTypes.h:687
@ ZYDIS_SWIZZLE_MODE_DDDD
Definition: DecoderTypes.h:688
@ ZYDIS_SWIZZLE_MODE_CDAB
Definition: DecoderTypes.h:682
struct ZydisDecodedInstructionRawVex_ ZydisDecodedInstructionRawVex
Detailed info about the VEX prefix.
struct ZydisDecodedInstructionAvx_ ZydisDecodedInstructionAvx
Extended info for AVX instructions.
enum ZydisISAExt_ ZydisISAExt
Defines the ZydisISAExt enum.
enum ZydisISASet_ ZydisISASet
Defines the ZydisISASet enum.
enum ZydisInstructionCategory_ ZydisInstructionCategory
Defines the ZydisInstructionCategory enum.
enum ZydisMnemonic_ ZydisMnemonic
Defines the ZydisMnemonic enum.
enum ZydisRegister_ ZydisRegister
Defines the ZydisRegister enum.
Mnemonic constant definitions and helper functions.
Utility functions and constants for registers.
Defines decoder/encoder-shared macros and types.
enum ZydisOperandEncoding_ ZydisOperandEncoding
Defines the ZydisOperandEncoding enum.
#define ZYDIS_MAX_INSTRUCTION_LENGTH
Definition: SharedTypes.h:49
enum ZydisInstructionEncoding_ ZydisInstructionEncoding
Defines the ZydisInstructionEncoding enum.
enum ZydisOperandType_ ZydisOperandType
Defines the ZydisOperandType enum.
enum ZydisOperandVisibility_ ZydisOperandVisibility
Defines the ZydisOperandVisibility enum.
ZyanU8 ZydisOperandActions
Defines the ZydisOperandActions data-type.
Definition: SharedTypes.h:406
enum ZydisOpcodeMap_ ZydisOpcodeMap
Defines the ZydisOpcodeMap enum.
enum ZydisElementType_ ZydisElementType
Defines the ZydisElementType enum.
ZyanU16 ZydisElementSize
Defines the ZydisElementSize datatype.
Definition: SharedTypes.h:194
enum ZydisMachineMode_ ZydisMachineMode
Defines the ZydisMachineMode enum.
ZyanU64 ZydisInstructionAttributes
Defines the ZydisInstructionAttributes data-type.
Definition: SharedTypes.h:509
Definition: DecoderTypes.h:404
ZydisAccessedFlagsMask tested
Definition: DecoderTypes.h:408
ZydisAccessedFlagsMask undefined
Definition: DecoderTypes.h:424
ZydisAccessedFlagsMask set_0
Definition: DecoderTypes.h:416
ZydisAccessedFlagsMask set_1
Definition: DecoderTypes.h:420
ZydisAccessedFlagsMask modified
Definition: DecoderTypes.h:412
Extended info for APX instructions.
Definition: DecoderTypes.h:1266
ZyanBool has_nf
Signals, if the APX no flags functionality is enabled for the instruction.
Definition: DecoderTypes.h:1274
ZyanBool has_ppx
Signals, if the APX push/pop performance-hint (PPX) is enabled for the instruction.
Definition: DecoderTypes.h:1284
ZydisDefaultFlagsValue default_flags
The APX default flags value (DFV) that is assigned to the status flags when the source condition code...
Definition: DecoderTypes.h:1295
ZydisSourceConditionCode scc
The APX source condition code.
Definition: DecoderTypes.h:1288
ZyanBool has_zu
Signals, if the APX zero upper functionality is enabled for the instruction.
Definition: DecoderTypes.h:1278
ZyanBool uses_egpr
Signals, if the instruction uses the extended GP registers (R16..R31).
Definition: DecoderTypes.h:1270
Contains info about the AVX broadcast.
Definition: DecoderTypes.h:1207
ZydisBroadcastMode mode
The AVX broadcast-mode.
Definition: DecoderTypes.h:1218
ZyanBool is_static
Signals, if the broadcast is a static broadcast.
Definition: DecoderTypes.h:1214
Contains info about the AVX data-conversion (KNC only).
Definition: DecoderTypes.h:1244
ZydisConversionMode mode
The AVX data-conversion mode.
Definition: DecoderTypes.h:1248
Info about the embedded writemask-register (AVX-512 and KNC only).
Definition: DecoderTypes.h:1193
ZydisRegister reg
The mask register.
Definition: DecoderTypes.h:1201
ZydisMaskMode mode
The masking mode.
Definition: DecoderTypes.h:1197
Contains info about the AVX rounding.
Definition: DecoderTypes.h:1224
ZydisRoundingMode mode
The AVX rounding-mode.
Definition: DecoderTypes.h:1228
Contains info about the AVX register-swizzle (KNC only).
Definition: DecoderTypes.h:1234
ZydisSwizzleMode mode
The AVX register-swizzle mode.
Definition: DecoderTypes.h:1238
Extended info for AVX instructions.
Definition: DecoderTypes.h:1184
struct ZydisDecodedInstructionAvx_::ZydisDecodedInstructionAvxSwizzle_ swizzle
struct ZydisDecodedInstructionAvx_::ZydisDecodedInstructionAvxRounding_ rounding
ZyanBool has_eviction_hint
Signals, if the instruction has a memory-eviction-hint (KNC only).
Definition: DecoderTypes.h:1258
struct ZydisDecodedInstructionAvx_::ZydisDecodedInstructionAvxConversion_ conversion
ZyanU16 vector_length
The AVX vector-length.
Definition: DecoderTypes.h:1188
ZyanBool has_sae
Signals, if the SAE (suppress-all-exceptions) functionality is enabled for the instruction.
Definition: DecoderTypes.h:1254
struct ZydisDecodedInstructionAvx_::ZydisDecodedInstructionAvxBroadcast_ broadcast
struct ZydisDecodedInstructionAvx_::ZydisDecodedInstructionAvxMask_ mask
Instruction meta info.
Definition: DecoderTypes.h:1302
ZydisBranchType branch_type
The branch type.
Definition: DecoderTypes.h:1318
ZydisISASet isa_set
The ISA-set.
Definition: DecoderTypes.h:1310
ZydisISAExt isa_ext
The ISA-set extension.
Definition: DecoderTypes.h:1314
ZydisExceptionClass exception_class
The exception class.
Definition: DecoderTypes.h:1322
ZydisInstructionCategory category
The instruction category.
Definition: DecoderTypes.h:1306
Detailed info about the EVEX prefix.
Definition: DecoderTypes.h:1037
ZyanU8 X3
Extension of the SIB.index/vidx field (inverted).
Definition: DecoderTypes.h:1045
ZyanU8 V4
High-16 NDS/VIDX register specifier.
Definition: DecoderTypes.h:1102
ZyanU8 R3
Extension of the ModRM.reg field (inverted).
Definition: DecoderTypes.h:1041
ZyanU8 L2
Vector-length specifier or rounding-control (most significant bit).
Definition: DecoderTypes.h:1090
ZyanU8 R4
High-16 register specifier modifier for the ModRM.reg field (inverted).
Definition: DecoderTypes.h:1053
ZyanU8 SCC
Definition: DecoderTypes.h:1110
ZyanU8 B4
High-16 register specifier modifier for the ModRM.rm or SIB.base field.
Definition: DecoderTypes.h:1057
ZyanU8 ND
Definition: DecoderTypes.h:1108
ZyanU8 L
Vector-length specifier or rounding-control (least significant bit).
Definition: DecoderTypes.h:1094
ZyanU8 aaa
Embedded opmask register specifier.
Definition: DecoderTypes.h:1106
ZyanU8 offset
The offset of the first evex byte, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:1116
ZyanU8 pp
Compressed legacy prefix.
Definition: DecoderTypes.h:1082
ZyanU8 X4
High-16 register specifier modifier for the SIB.index/vidx field (inverted).
Definition: DecoderTypes.h:1078
ZyanU8 W
64-bit operand-size promotion or opcode-extension.
Definition: DecoderTypes.h:1065
ZyanU8 NF
Definition: DecoderTypes.h:1109
ZyanU8 b
Broadcast/RC/SAE control.
Definition: DecoderTypes.h:1098
ZyanU8 z
Zeroing/Merging.
Definition: DecoderTypes.h:1086
ZyanU8 vvvv
NDS/NDD (non-destructive-source/destination) register specifier (inverted).
Definition: DecoderTypes.h:1070
ZyanU8 U
The U-bit.
Definition: DecoderTypes.h:1074
ZyanU8 B3
Extension of the ModRM.rm or SIB.base field (inverted).
Definition: DecoderTypes.h:1049
ZyanU8 mmm
Opcode-map specifier.
Definition: DecoderTypes.h:1061
Detailed info about the MVEX prefix.
Definition: DecoderTypes.h:1123
ZyanU8 SSS
Swizzle/broadcast/up-convert/down-convert/static-rounding controls.
Definition: DecoderTypes.h:1164
ZyanU8 R2
High-16 register specifier modifier (inverted).
Definition: DecoderTypes.h:1139
ZyanU8 kkk
Embedded opmask register specifier.
Definition: DecoderTypes.h:1172
ZyanU8 X
Extension of the SIB.index/vidx field (inverted).
Definition: DecoderTypes.h:1131
ZyanU8 offset
The offset of the first mvex byte, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:1177
ZyanU8 R
Extension of the ModRM.reg field (inverted).
Definition: DecoderTypes.h:1127
ZyanU8 pp
Compressed legacy prefix.
Definition: DecoderTypes.h:1156
ZyanU8 W
64-bit operand-size promotion or opcode-extension.
Definition: DecoderTypes.h:1147
ZyanU8 mmmm
Opcode-map specifier.
Definition: DecoderTypes.h:1143
ZyanU8 vvvv
NDS/NDD (non-destructive-source/destination) register specifier (inverted).
Definition: DecoderTypes.h:1152
ZyanU8 V2
High-16 NDS/VIDX register specifier.
Definition: DecoderTypes.h:1168
ZyanU8 E
Non-temporal/eviction hint.
Definition: DecoderTypes.h:1160
ZyanU8 B
Extension of the ModRM.rm or SIB.base field (inverted).
Definition: DecoderTypes.h:1135
Detailed info about the REX2 prefix.
Definition: DecoderTypes.h:895
ZyanU8 X3
Extension of the SIB.index field (bit 3).
Definition: DecoderTypes.h:923
ZyanU8 R3
Extension of the ModRM.reg field (bit 3).
Definition: DecoderTypes.h:919
ZyanU8 R4
Extension of the ModRM.reg field (bit 4).
Definition: DecoderTypes.h:903
ZyanU8 B4
Extension of the ModRM.rm, SIB.base, or opcode.reg field (bit 4).
Definition: DecoderTypes.h:911
ZyanU8 offset
The offset of the effective REX2 byte, relative to the beginning of the instruction,...
Definition: DecoderTypes.h:936
ZyanU8 M0
Legacy map 0 (0x0F) selector bit.
Definition: DecoderTypes.h:899
ZyanU8 X4
Extension of the SIB.index field (bit 4).
Definition: DecoderTypes.h:907
ZyanU8 W
64-bit operand-size promotion, opcode-extension or PPX hint.
Definition: DecoderTypes.h:915
ZyanU8 B3
Extension of the ModRM.rm, SIB.base, or opcode.reg field (bit 3).
Definition: DecoderTypes.h:927
Detailed info about the REX prefix.
Definition: DecoderTypes.h:860
ZyanU8 X
Extension of the SIB.index field.
Definition: DecoderTypes.h:872
ZyanU8 offset
The offset of the effective REX byte, relative to the beginning of the instruction,...
Definition: DecoderTypes.h:888
ZyanU8 R
Extension of the ModRM.reg field.
Definition: DecoderTypes.h:868
ZyanU8 W
64-bit operand-size promotion.
Definition: DecoderTypes.h:864
ZyanU8 B
Extension of the ModRM.rm, SIB.base, or opcode.reg field.
Definition: DecoderTypes.h:876
Detailed info about the VEX prefix.
Definition: DecoderTypes.h:988
ZyanU8 m_mmmm
Opcode-map specifier.
Definition: DecoderTypes.h:1004
ZyanU8 X
Extension of the SIB.index field (inverted).
Definition: DecoderTypes.h:996
ZyanU8 size
The size of the VEX prefix, in bytes.
Definition: DecoderTypes.h:1030
ZyanU8 L
Vector-length specifier.
Definition: DecoderTypes.h:1017
ZyanU8 offset
The offset of the first VEX byte, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:1026
ZyanU8 R
Extension of the ModRM.reg field (inverted).
Definition: DecoderTypes.h:992
ZyanU8 pp
Compressed legacy prefix.
Definition: DecoderTypes.h:1021
ZyanU8 W
64-bit operand-size promotion or opcode-extension.
Definition: DecoderTypes.h:1008
ZyanU8 vvvv
NDS/NDD (non-destructive-source/destination) register specifier (inverted).
Definition: DecoderTypes.h:1013
ZyanU8 B
Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).
Definition: DecoderTypes.h:1000
Detailed info about the XOP prefix.
Definition: DecoderTypes.h:943
ZyanU8 m_mmmm
Opcode-map specifier.
Definition: DecoderTypes.h:959
ZyanU8 X
Extension of the SIB.index field (inverted).
Definition: DecoderTypes.h:951
ZyanU8 L
Vector-length specifier.
Definition: DecoderTypes.h:972
ZyanU8 offset
The offset of the first xop byte, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:981
ZyanU8 R
Extension of the ModRM.reg field (inverted).
Definition: DecoderTypes.h:947
ZyanU8 pp
Compressed legacy prefix.
Definition: DecoderTypes.h:976
ZyanU8 W
64-bit operand-size promotion or opcode-extension.
Definition: DecoderTypes.h:963
ZyanU8 vvvv
NDS/NDD (non-destructive-source/destination) register specifier (inverted).
Definition: DecoderTypes.h:968
ZyanU8 B
Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).
Definition: DecoderTypes.h:955
Detailed info about the ModRM byte.
Definition: DecoderTypes.h:1374
ZyanU8 rm
Register specifier or opcode-extension.
Definition: DecoderTypes.h:1386
ZyanU8 mod
The addressing mode.
Definition: DecoderTypes.h:1378
ZyanU8 offset
The offset of the ModRM byte, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:1391
ZyanU8 reg
Register specifier or opcode-extension.
Definition: DecoderTypes.h:1382
Detailed info about displacement-bytes.
Definition: DecoderTypes.h:1420
ZyanU8 size
The physical displacement size, in bits.
Definition: DecoderTypes.h:1428
ZyanI64 value
The displacement value.
Definition: DecoderTypes.h:1424
ZyanU8 offset
The offset of the displacement data, relative to the beginning of the instruction,...
Definition: DecoderTypes.h:1434
Detailed info about immediate-bytes.
Definition: DecoderTypes.h:1440
ZyanBool is_address
Signals, if the immediate value contains an address.
Definition: DecoderTypes.h:1448
ZyanU8 size
The physical immediate size, in bits.
Definition: DecoderTypes.h:1465
ZyanBool is_relative
Signals, if the immediate value contains a relative offset.
Definition: DecoderTypes.h:1453
ZyanBool is_signed
Signals, if the immediate value is signed.
Definition: DecoderTypes.h:1444
ZyanU8 offset
The offset of the immediate data, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:1470
union ZydisDecodedInstructionRaw_::ZydisDecodedInstructionRawImm_::ZydisDecodedInstructionRawImmValue_ value
Detailed info about the legacy prefixes (including REX).
Definition: DecoderTypes.h:1339
ZydisPrefixType type
The prefix type.
Definition: DecoderTypes.h:1343
ZyanU8 value
The prefix byte.
Definition: DecoderTypes.h:1347
Detailed info about the SIB byte.
Definition: DecoderTypes.h:1397
ZyanU8 base
The base-register specifier.
Definition: DecoderTypes.h:1409
ZyanU8 scale
The scale factor.
Definition: DecoderTypes.h:1401
ZyanU8 offset
The offset of the SIB byte, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:1414
ZyanU8 index
The index-register specifier.
Definition: DecoderTypes.h:1405
Detailed info about different instruction-parts like ModRM, SIB or encoding-prefixes.
Definition: DecoderTypes.h:1330
ZydisDecodedInstructionRawRex rex
Definition: DecoderTypes.h:1362
ZyanU8 prefix_count
The number of legacy prefixes.
Definition: DecoderTypes.h:1334
struct ZydisDecodedInstructionRaw_::ZydisDecodedInstructionRawPrefixes_ prefixes[ZYDIS_MAX_INSTRUCTION_LENGTH]
struct ZydisDecodedInstructionRaw_::ZydisDecodedInstructionRawImm_ imm[2]
ZydisDecodedInstructionRawMvex mvex
Definition: DecoderTypes.h:1367
ZydisDecodedInstructionRawXop xop
Definition: DecoderTypes.h:1364
struct ZydisDecodedInstructionRaw_::ZydisDecodedInstructionModRm_ modrm
ZydisInstructionEncoding encoding2
Definition: DecoderTypes.h:1356
ZydisDecodedInstructionRawEvex evex
Definition: DecoderTypes.h:1366
ZydisDecodedInstructionRawRex2 rex2
Definition: DecoderTypes.h:1363
struct ZydisDecodedInstructionRaw_::ZydisDecodedInstructionRawDisp_ disp
struct ZydisDecodedInstructionRaw_::ZydisDecodedInstructionRawSib_ sib
ZydisDecodedInstructionRawVex vex
Definition: DecoderTypes.h:1365
Information about a decoded instruction.
Definition: DecoderTypes.h:1478
ZydisMnemonic mnemonic
The instruction-mnemonic.
Definition: DecoderTypes.h:1486
ZyanU8 operand_width
The effective operand width.
Definition: DecoderTypes.h:1510
ZydisDecodedInstructionMeta meta
Meta info.
Definition: DecoderTypes.h:1558
ZyanU8 opcode
The instruction-opcode.
Definition: DecoderTypes.h:1502
ZydisMachineMode machine_mode
The machine mode used to decode this instruction.
Definition: DecoderTypes.h:1482
ZydisOpcodeMap opcode_map
The opcode-map.
Definition: DecoderTypes.h:1498
ZydisInstructionEncoding encoding
The instruction-encoding (LEGACY, 3DNOW, VEX, EVEX, XOP).
Definition: DecoderTypes.h:1494
ZydisInstructionAttributes attributes
See Instruction attributes.
Definition: DecoderTypes.h:1533
ZyanU8 stack_width
The stack width.
Definition: DecoderTypes.h:1506
const ZydisAccessedFlags * cpu_flags
Information about CPU flags accessed by the instruction.
Definition: DecoderTypes.h:1540
ZyanU8 address_width
The effective address width.
Definition: DecoderTypes.h:1514
ZyanU8 operand_count
The number of instruction-operands.
Definition: DecoderTypes.h:1522
ZyanU8 length
The length of the decoded instruction.
Definition: DecoderTypes.h:1490
ZydisDecodedInstructionAvx avx
Extended info for AVX instructions.
Definition: DecoderTypes.h:1550
const ZydisAccessedFlags * fpu_flags
Information about FPU flags accessed by the instruction.
Definition: DecoderTypes.h:1546
ZydisDecodedInstructionRaw raw
Detailed info about different instruction-parts like ModRM, SIB or encoding-prefixes.
Definition: DecoderTypes.h:1563
ZydisDecodedInstructionApx apx
Extended info for APX instructions.
Definition: DecoderTypes.h:1554
ZyanU8 operand_count_visible
The number of explicit (visible) instruction-operands.
Definition: DecoderTypes.h:1529
Extended info for immediate-operands.
Definition: DecoderTypes.h:181
ZyanBool is_address
Signals, if the immediate value contains an address.
Definition: DecoderTypes.h:189
ZyanU8 size
The physical immediate size, in bits.
Definition: DecoderTypes.h:211
ZyanBool is_relative
Signals, if the immediate value contains a relative offset.
Definition: DecoderTypes.h:194
ZyanBool is_signed
Signals, if the immediate value is signed.
Definition: DecoderTypes.h:185
ZyanU8 offset
The offset of the immediate data, relative to the beginning of the instruction, in bytes.
Definition: DecoderTypes.h:207
union ZydisDecodedOperandImm_::ZydisDecodedOperandImmValue_ value
Extended info for memory-operands with displacement.
Definition: DecoderTypes.h:151
ZyanU8 size
The physical displacement size, in bits.
Definition: DecoderTypes.h:164
ZyanI64 value
The displacement value.
Definition: DecoderTypes.h:155
ZyanU8 offset
The offset of the displacement data, relative to the beginning of the instruction,...
Definition: DecoderTypes.h:160
Extended info for memory-operands.
Definition: DecoderTypes.h:126
ZydisMemoryOperandType type
The type of the memory operand.
Definition: DecoderTypes.h:130
ZydisRegister segment
The segment register.
Definition: DecoderTypes.h:134
ZydisRegister base
The base register.
Definition: DecoderTypes.h:138
ZyanU8 scale
The scale factor.
Definition: DecoderTypes.h:146
ZydisRegister index
The index register.
Definition: DecoderTypes.h:142
struct ZydisDecodedOperandMem_::ZydisDecodedOperandMemDisp_ disp
Extended info for pointer-operands.
Definition: DecoderTypes.h:172
ZyanU32 offset
Definition: DecoderTypes.h:174
ZyanU16 segment
Definition: DecoderTypes.h:173
Extended info for register-operands.
Definition: DecoderTypes.h:115
ZydisRegister value
The register value.
Definition: DecoderTypes.h:119
Defines the ZydisDecodedOperand struct.
Definition: DecoderTypes.h:218
ZyanU16 size
The logical size of the operand (in bits).
Definition: DecoderTypes.h:238
ZyanU16 element_count
The number of elements.
Definition: DecoderTypes.h:250
ZydisOperandActions actions
The operand-actions.
Definition: DecoderTypes.h:230
ZydisOperandAttributes attributes
Definition: DecoderTypes.h:254
ZydisOperandEncoding encoding
The operand-encoding.
Definition: DecoderTypes.h:234
ZydisDecodedOperandReg reg
Definition: DecoderTypes.h:266
ZydisDecodedOperandImm imm
Definition: DecoderTypes.h:269
ZydisElementType element_type
The element-type.
Definition: DecoderTypes.h:242
ZydisOperandVisibility visibility
The visibility of the operand.
Definition: DecoderTypes.h:226
ZydisDecodedOperandPtr ptr
Definition: DecoderTypes.h:268
ZydisDecodedOperandMem mem
Definition: DecoderTypes.h:267
ZydisOperandType type
The type of the operand.
Definition: DecoderTypes.h:258
ZyanU8 id
The operand-id.
Definition: DecoderTypes.h:222
ZydisElementSize element_size
The size of a single element.
Definition: DecoderTypes.h:246
The decoder context is used to preserve some internal state between subsequent decode operations for ...
Definition: DecoderTypes.h:1583
ZyanU8 X3
Definition: DecoderTypes.h:1608
ZyanU8 functionality
The MVEX functionality.
Definition: DecoderTypes.h:1677
struct ZydisDecoderContext_::@7 mvex
Internal MVEX-specific information.
ZyanU8 V4
Definition: DecoderTypes.h:1614
ZyanU8 R3
Definition: DecoderTypes.h:1606
ZyanU8 tuple_type
The EVEX tuple-type.
Definition: DecoderTypes.h:1663
ZyanU8 id_base
The final register id for the base register.
Definition: DecoderTypes.h:1646
ZyanU8 R4
Definition: DecoderTypes.h:1607
ZyanU8 cd8_scale
The scale factor for EVEX/MVEX compressed 8-bit displacement values.
Definition: DecoderTypes.h:1682
struct ZydisDecoderContext_::@5 reg_info
Information about encoded operand registers.
ZyanU8 mask
Definition: DecoderTypes.h:1616
ZyanU8 element_size
The EVEX element-size.
Definition: DecoderTypes.h:1667
ZyanU8 B4
Definition: DecoderTypes.h:1611
ZyanU8 L
Definition: DecoderTypes.h:1612
ZyanU8 eosz_index
Contains the effective operand-size index.
Definition: DecoderTypes.h:1593
ZyanU8 LL
Definition: DecoderTypes.h:1613
ZyanU8 id_rm
The final register id for the rm encoded register.
Definition: DecoderTypes.h:1636
struct ZydisDecoderContext_::@6 evex
Internal EVEX-specific information.
ZyanU8 X4
Definition: DecoderTypes.h:1609
ZyanU8 W
Definition: DecoderTypes.h:1605
ZyanU8 vvvv
Definition: DecoderTypes.h:1615
ZyanU8 B3
Definition: DecoderTypes.h:1610
ZyanU8 id_reg
The final register id for the reg encoded register.
Definition: DecoderTypes.h:1630
const void * definition
A pointer to the internal instruction definition.
Definition: DecoderTypes.h:1587
struct ZydisDecoderContext_::@4 vector_unified
Contains some cached REX/REX2/XOP/VEX/EVEX/MVEX values to provide uniform access.
ZyanU8 id_index
The final register id for the index register.
Definition: DecoderTypes.h:1653
ZyanBool is_mod_reg
Signals if the modrm.mod == 3 or reg form is forced for the instruction.
Definition: DecoderTypes.h:1626
ZyanU8 id_ndsndd
The final register id for the ndsndd (.vvvv) encoded register.
Definition: DecoderTypes.h:1640
ZyanU8 easz_index
Contains the effective address-size index.
Definition: DecoderTypes.h:1599
The immediate value.
Definition: DecoderTypes.h:199
ZyanU64 u
Definition: DecoderTypes.h:200
ZyanI64 s
Definition: DecoderTypes.h:201