libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
archEnums.hpp
Go to the documentation of this file.
1
2/*
3** Copyright (C) - Triton
4**
5** This program is under the terms of the Apache License 2.0.
6*/
7
8#ifndef TRITON_ARCHENUMS_HPP
9#define TRITON_ARCHENUMS_HPP
10
11#include <cstdint>
12#include <functional>
13
14
15
17namespace triton {
24 namespace arch {
36 #ifdef COMPILE_RISCV
37 ARCH_RV32,
38 ARCH_RV64,
39 #endif
42 };
43
49
57
66
70
71 #define REG_SPEC(UPPER_NAME, _1, _2, _3, _4, _5, _6, _7, _8) \
72 ID_REG_X86_##UPPER_NAME,
73 #define REG_SPEC_NO_CAPSTONE REG_SPEC
74 #include "triton/x86.spec"
75
76 #define REG_SPEC(UPPER_NAME, _1, _2, _3, _4, _5) \
77 ID_REG_AARCH64_##UPPER_NAME,
78 #define REG_SPEC_NO_CAPSTONE REG_SPEC
79 #define SYS_REG_SPEC REG_SPEC
80 #include "triton/aarch64.spec"
81
82 #define REG_SPEC(UPPER_NAME, _1, _2, _3, _4, _5) \
83 ID_REG_ARM32_##UPPER_NAME,
84 #define REG_SPEC_NO_CAPSTONE REG_SPEC
85 #include "triton/arm32.spec"
86
87 #ifdef COMPILE_RISCV
88 #define REG_SPEC(_1, UPPER_NAME, _2, _3, _4, _5, _6) \
89 ID_REG_RV64_##UPPER_NAME,
90 #define REG_SPEC_NO_CAPSTONE REG_SPEC
91 #include "triton/riscv64.spec"
92
93 #define REG_SPEC(_1, UPPER_NAME, _2, _3, _4, _5, _6) \
94 ID_REG_RV32_##UPPER_NAME,
95 #define REG_SPEC_NO_CAPSTONE REG_SPEC
96 #include "triton/riscv32.spec"
97 #endif
98
99 /* Must be the last item */
101 };
102
104 namespace x86 {
127
129 };
130
132 namespace arm {
154
168
189
209
211 };
212
213 #ifdef COMPILE_RISCV
215 namespace riscv {
223 enum insn_group_e {
224 ID_GRP_INVALID = 0,
225 /* Generic groups */
226 ID_GRP_JUMP,
227 ID_GRP_CALL,
228 ID_GRP_RET,
229 ID_GRP_INT,
230 ID_GRP_IRET,
231 ID_GRP_PRIVILEGE,
232 ID_GRP_BRANCH_RELATIVE,
233 /* Architecture-specific groups */
234 ID_GRP_ISRV32,
235 ID_GRP_ISRV64,
236 ID_GRP_HASSTDEXTA,
237 ID_GRP_HASSTDEXTC,
238 ID_GRP_HASSTDEXTD,
239 ID_GRP_HASSTDEXTF,
240 ID_GRP_HASSTDEXTM,
241 /*
242 ID_GRP_ISRVA,
243 ID_GRP_ISRVC,
244 ID_GRP_ISRVD,
245 ID_GRP_ISRVCD,
246 ID_GRP_ISRVF,
247 ID_GRP_ISRV32C,
248 ID_GRP_ISRV32CF,
249 ID_GRP_ISRVM,
250 ID_GRP_ISRV64A,
251 ID_GRP_ISRV64C,
252 ID_GRP_ISRV64D,
253 ID_GRP_ISRV64F,
254 ID_GRP_ISRV64M,
255 */
256
257 /* Must be the last item */
258 ID_GRP_ENDING
259 };
260
262 };
263 #endif
265 };
267};
268
269namespace std {
271 template <> struct hash<triton::arch::register_e> : public hash<uint64_t> {
272 };
273};
274
275#endif /* TRITON_ARCHENUMS_HPP */
register_e
Types of register.
Definition archEnums.hpp:68
@ ID_REG_INVALID
invalid = 0
Definition archEnums.hpp:69
@ ID_REG_LAST_ITEM
must be the last item
shift_e
Types of shift.
vas_e
Vector arrangement specifier.
extend_e
Types of extend.
condition_e
Types of condition.
@ ID_SHIFT_LSR
Logical Shift Right (immediate)
@ ID_SHIFT_LSR_REG
Logical Shift Right (register)
@ ID_SHIFT_ASR
Arithmetic Shift Right (immediate)
@ ID_SHIFT_ROR_REG
Rotate Right (register)
@ ID_SHIFT_ROR
Rotate Right (immediate)
@ ID_SHIFT_ASR_REG
Arithmetic Shift Right (register)
@ ID_SHIFT_RRX
Rotate Right with Extend (immediate)
@ ID_SHIFT_RRX_REG
Rotate Right with Extend (register)
@ ID_SHIFT_LAST_ITEM
Must be the last item.
@ ID_SHIFT_LSL_REG
Logical Shift Left (register)
@ ID_SHIFT_INVALID
invalid
@ ID_SHIFT_LSL
Logical Shift Left (immediate)
@ ID_VAS_4S
4 lanes, each containing a 32-bit element.
@ ID_VAS_2D
2 lanes, each containing a 64-bit element.
@ ID_VAS_4B
4 lane, containing an 8-bit element.
@ ID_VAS_1D
1 lane containing a 64-bit element.
@ ID_VAS_16B
16 lanes, each containing an 8-bit element.
@ ID_VAS_8B
8 lanes, each containing an 8-bit element.
@ ID_VAS_1S
1 lane, containing an 32-bit element.
@ ID_VAS_1Q
1 lane containing a 128-bit element.
@ ID_VAS_INVALID
invalid
@ ID_VAS_1B
1 lane, containing an 8-bit element.
@ ID_VAS_8H
8 lanes, each containing a 16-bit element.
@ ID_VAS_1H
1 lane, containing an 16-bit element.
@ ID_VAS_4H
4 lanes, each containing a 16-bit element.
@ ID_VAS_LAST_ITEM
must be the last item.
@ ID_VAS_2H
2 lanes, each containing a 16-bit element.
@ ID_VAS_2S
2 lanes, each containing a 32-bit element.
@ ID_EXTEND_SXTW
Extracts a word (32-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_UXTX
Use the whole 64-bit register.
@ ID_EXTEND_SXTX
Use the whole 64-bit register.
@ ID_EXTEND_SXTH
Extracts a halfword (16-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_UXTB
Extracts a byte (8-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_INVALID
invalid
@ ID_EXTEND_UXTW
Extracts a word (32-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_SXTB
Extracts a byte (8-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_UXTH
Extracts a halfword (16-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_LAST_ITEM
Must be the last item.
@ ID_CONDITION_HS
Higher or same (unsigned >=). C set.
@ ID_CONDITION_PL
Positive or zero. N clear.
@ ID_CONDITION_VC
No overflow. V clear.
@ ID_CONDITION_LE
Signed <=. Z set, N and V differ.
@ ID_CONDITION_VS
Overflow. V set.
@ ID_CONDITION_LAST_ITEM
must be the last item.
@ ID_CONDITION_MI
Negative. N set.
@ ID_CONDITION_GE
Signed >=. N and V the same.
@ ID_CONDITION_GT
Signed >. Z clear, N and V the same.
@ ID_CONDITION_HI
Higher (unsigned >). C set and Z clear.
@ ID_CONDITION_NE
Not equal. Z clear.
@ ID_CONDITION_AL
Always. Any flags. This suffix is normally omitted.
@ ID_CONDITION_LO
Lower (unsigned <). C clear.
@ ID_CONDITION_LT
Signed <. N and V differ.
@ ID_CONDITION_LS
Lower or same (unsigned <=). C clear or Z set.
@ ID_CONDITION_INVALID
invalid
@ ID_CONDITION_EQ
Equal. Z set.
prefix_e
Types of prefix.
@ ID_PREFIX_REPNE
REPNE.
@ ID_PREFIX_INVALID
invalid
@ ID_PREFIX_LAST_ITEM
must be the last item
The Triton namespace.