-
Notifications
You must be signed in to change notification settings - Fork 0
/
highlevel.h
executable file
·135 lines (128 loc) · 2.45 KB
/
highlevel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#ifndef HIGHLEVEL_H
#define HIGHLEVEL_H
#include "formatter.h"
// Generated high-level opcodes and support functions/classes
// Do not edit this file!
enum HighLevelOpcode {
HINS_nop,
HINS_add_b,
HINS_add_w,
HINS_add_l,
HINS_add_q,
HINS_sub_b,
HINS_sub_w,
HINS_sub_l,
HINS_sub_q,
HINS_mul_b,
HINS_mul_w,
HINS_mul_l,
HINS_mul_q,
HINS_div_b,
HINS_div_w,
HINS_div_l,
HINS_div_q,
HINS_mod_b,
HINS_mod_w,
HINS_mod_l,
HINS_mod_q,
HINS_lshift_b,
HINS_lshift_w,
HINS_lshift_l,
HINS_lshift_q,
HINS_rshift_b,
HINS_rshift_w,
HINS_rshift_l,
HINS_rshift_q,
HINS_cmplt_b,
HINS_cmplt_w,
HINS_cmplt_l,
HINS_cmplt_q,
HINS_cmplte_b,
HINS_cmplte_w,
HINS_cmplte_l,
HINS_cmplte_q,
HINS_cmpgt_b,
HINS_cmpgt_w,
HINS_cmpgt_l,
HINS_cmpgt_q,
HINS_cmpgte_b,
HINS_cmpgte_w,
HINS_cmpgte_l,
HINS_cmpgte_q,
HINS_cmpeq_b,
HINS_cmpeq_w,
HINS_cmpeq_l,
HINS_cmpeq_q,
HINS_cmpneq_b,
HINS_cmpneq_w,
HINS_cmpneq_l,
HINS_cmpneq_q,
HINS_and_b,
HINS_and_w,
HINS_and_l,
HINS_and_q,
HINS_or_b,
HINS_or_w,
HINS_or_l,
HINS_or_q,
HINS_xor_b,
HINS_xor_w,
HINS_xor_l,
HINS_xor_q,
HINS_neg_b,
HINS_neg_w,
HINS_neg_l,
HINS_neg_q,
HINS_not_b,
HINS_not_w,
HINS_not_l,
HINS_not_q,
HINS_compl_b,
HINS_compl_w,
HINS_compl_l,
HINS_compl_q,
HINS_inc_b,
HINS_inc_w,
HINS_inc_l,
HINS_inc_q,
HINS_dec_b,
HINS_dec_w,
HINS_dec_l,
HINS_dec_q,
HINS_mov_b,
HINS_mov_w,
HINS_mov_l,
HINS_mov_q,
HINS_sconv_bw,
HINS_sconv_bl,
HINS_sconv_bq,
HINS_sconv_wl,
HINS_sconv_wq,
HINS_sconv_lq,
HINS_uconv_bw,
HINS_uconv_bl,
HINS_uconv_bq,
HINS_uconv_wl,
HINS_uconv_wq,
HINS_uconv_lq,
HINS_ret,
HINS_jmp,
HINS_call,
HINS_enter,
HINS_leave,
HINS_localaddr,
HINS_cjmp_t,
HINS_cjmp_f,
}; // HighLevelOpcode enumeration
// Translate a high-level opcode to its assembler mnemonic.
// Returns nullptr if the opcode is unknown.
const char *highlevel_opcode_to_str(HighLevelOpcode opcode);
// Determine the source operand size (int bytes) implied by a specified
// opcode. If the opcode doesn't have a source operand conveying data,
// 0 is returned.
int highlevel_opcode_get_source_operand_size(HighLevelOpcode opcode);
// Determine the destination operand size (int bytes) implied by a specified
// opcode. If the opcode doesn't have a destination operand,
// 0 is returned.
int highlevel_opcode_get_dest_operand_size(HighLevelOpcode opcode);
#endif // HIGHLEVEL_H