ROSE
0.11.145.147
src
Rose
BinaryAnalysis
InstructionEnumsMips.h
1
/* Enum constants for MIPS architectures */
2
#ifndef ROSE_BinaryAnalysis_InstructionEnumsMips_H
3
#define ROSE_BinaryAnalysis_InstructionEnumsMips_H
4
#include <featureTests.h>
5
#ifdef ROSE_ENABLE_BINARY_ANALYSIS
6
7
namespace
Rose
{
8
namespace
BinaryAnalysis {
9
10
// MIPS major register numbers.
11
enum
MipsRegisterClass {
12
mips_regclass_gpr,
// General purpose registers. Minors are 0..31.
13
mips_regclass_spr,
// Special purpose registers. Minors are the MipsSpecialPurposeRegisters enum members.
14
mips_regclass_fpr,
// Floating point registers. Minors are 0..31.
15
mips_regclass_fcsr,
// Floating point control/status register. Minors are MipsFcsrMinor.
16
mips_regclass_cp0gpr,
// General purpose registers for coprocessor 0. Minors are 0..31.
17
mips_regclass_cp2gpr,
// Coprocessor 2 general purpose registers. Minors are implementation defined.
18
mips_regclass_cp2spr,
// Coprocessor 2 special purpose (i.e., control) registers. Minors are implementation dfnd.
19
mips_regclass_sgpr,
// Shadow general purpose registers.
20
mips_regclass_hw,
// Hardware registers.
21
};
22
23
// Portions of the FCSR register. These are the minor numbers for mips_regclass_fcsr.
24
enum
MipsFcsrMinors {
25
mips_fcsr_all,
// All bits of the FCSR.
26
mips_fcsr_fccr,
// Bits that compose the FP condition codes register.
27
mips_fcsr_fexr,
// Bits that compose the FP exceptions register.
28
mips_fcsr_fenr
// Bits that compose the FP enables register.
29
};
30
31
// MIPS special purpose register minor numbers.
32
enum
MipsSpecialPurposeRegister {
33
mips_spr_hi,
// Hi floating point result.
34
mips_spr_lo,
// Lo floating point result.
35
mips_spr_pc,
// Program counter.
36
mips_spr_fir,
// Floating point implementation and revision register.
37
mips_spr_fcsr
// Floating point control/status register (used to be known as FCR31)
38
};
39
40
// Major numbers for MIPS for RiscOperators::interrupt
41
enum
MipsInterruptMajor {
42
mips_signal_exception
// The "SignalException" function from the MIPS ISA manual
43
};
44
45
// Minor interrupt numbers for RiscOperators::interrupt
46
enum
MipsInterruptMinor {
47
mips_integer_overflow,
48
mips_breakpoint
49
};
50
51
// MIPS data formats
52
enum
MipsDataFormat {
53
mips_fmt_w,
// "word", 16 bit integral type
54
mips_fmt_l,
// "long" (a.k.a., "double word"), 32 bit integral type
55
mips_fmt_s,
// "single-precision", 32-bit floating-point type
56
mips_fmt_d,
// "double-precision", 64-bit floating-point type
57
mips_fmt_ps
// "paired-single", pair of 32-bit floating point types
58
};
59
60
// Kinds of MIPS instructions.
61
enum
MipsInstructionKind {
62
mips_unknown_instruction,
63
mips_abs_s,
// Floating point absolute value single precision.
64
mips_abs_d,
// Floating point absolute value double precision.
65
mips_abs_ps,
// Floating point absolute value pair of single precision.
66
mips_add,
// Add word.
67
mips_add_s,
// Floating point add single precision.
68
mips_add_d,
// Floating point add double precision.
69
mips_add_ps,
// Floating point add pair of single precision.
70
mips_addi,
// Add immediate word.
71
mips_addiu,
// Add immediate unsigned word.
72
mips_addu,
// Add unsigned word.
73
mips_alnv_ps,
// Floating point align variable pair of single precision.
74
mips_and,
// Bitwise logical AND.
75
mips_andi,
// Bitwise logical AND immediate.
76
mips_bc1f,
// Branch on FP false.
77
mips_bc1fl,
// Branch on FP false likely.
78
mips_bc1t,
// Branch on FP true.
79
mips_bc1tl,
// Branch on FP true likely.
80
mips_bc2f,
// Branch on COP2 false.
81
mips_bc2fl,
// Branch on COP2 false likely.
82
mips_bc2t,
// Branch on COP2 true.
83
mips_bc2tl,
// Branch on COP2 true likely.
84
mips_beq,
// Branch on equal.
85
mips_beql,
// Branch on equal likely.
86
mips_bgez,
// Branch on greater than or equal to zero.
87
mips_bgezal,
// Branch on greater than or equal to zero and link.
88
mips_bgezall,
// Branch on greater than or equal to zero and link likely.
89
mips_bgezl,
// Branch on greater than or equal to zero likely.
90
mips_bgtz,
// Branch on greater than zero.
91
mips_bgtzl,
// Branch on greater than zero likely.
92
mips_blez,
// Branch on less than or equal to zero.
93
mips_blezl,
// Branch on less than or equal to zero likely.
94
mips_bltz,
// Branch on less than zero.
95
mips_bltzal,
// Branch on less than zero and link.
96
mips_bltzall,
// Branch on less than zero and link likely.
97
mips_bltzl,
// Branch on less than zero likely.
98
mips_bne,
// Branch on not equal.
99
mips_bnel,
// Branch on not equal likely.
100
mips_break,
// Break point.
101
mips_c_f_s,
// Floating point compare false single precision.
102
mips_c_un_s,
// Floating point compare unordered single precision.
103
mips_c_eq_s,
// Floating point compare equal single precision.
104
mips_c_ueq_s,
// Floating point compare unordered equal.
105
mips_c_olt_s,
// Floating point compare ordered or less than single precision.
106
mips_c_ult_s,
// Floating point compare unordered or less than single precision.
107
mips_c_ole_s,
// Floating point compare ordered or less than or equal single precision.
108
mips_c_ule_s,
// Floating point compare unordered or less than or equal single precision.
109
mips_c_sf_s,
// Floating point compare signaling false single precision.
110
mips_c_ngle_s,
// Floating point compare not greater than or less than or equal single precision.
111
mips_c_seq_s,
// Floating point compare signaling equal single precision.
112
mips_c_ngl_s,
// Floating point compare not greater than or less than single precision.
113
mips_c_lt_s,
// Floating point compare less than single precision.
114
mips_c_nge_s,
// Floating point compare not greater than or equal single precision.
115
mips_c_le_s,
// Floating point compare less than or equal single precision.
116
mips_c_ngt_s,
// Floating point compare not greater than single precision.
117
mips_c_f_d,
// Floating point compare false double precision.
118
mips_c_un_d,
// Floating point compare unordered double precision.
119
mips_c_eq_d,
// Floating point compare equal double precision.
120
mips_c_ueq_d,
// Floating point compare unordered equal.
121
mips_c_olt_d,
// Floating point compare ordered or less than double precision.
122
mips_c_ult_d,
// Floating point compare unordered or less than double precision.
123
mips_c_ole_d,
// Floating point compare ordered or less than or equal double precision.
124
mips_c_ule_d,
// Floating point compare unordered or less than or equal double precision.
125
mips_c_sf_d,
// Floating point compare signaling false double precision.
126
mips_c_ngle_d,
// Floating point compare not greater than or less than or equal double precision.
127
mips_c_seq_d,
// Floating point compare signaling equal double precision.
128
mips_c_ngl_d,
// Floating point compare not greater than or less than double precision.
129
mips_c_lt_d,
// Floating point compare less than double precision.
130
mips_c_nge_d,
// Floating point compare not greater than or equal double precision.
131
mips_c_le_d,
// Floating point compare less than or equal double precision.
132
mips_c_ngt_d,
// Floating point compare not greater than double precision.
133
mips_c_f_ps,
// Floating point compare false pair of single precision.
134
mips_c_un_ps,
// Floating point compare unordered pair of single precision.
135
mips_c_eq_ps,
// Floating point compare equal pair of single precision.
136
mips_c_ueq_ps,
// Floating point compare unordered equal.
137
mips_c_olt_ps,
// Floating point compare ordered or less than pair of single precision.
138
mips_c_ult_ps,
// Floating point compare unordered or less than pair of single precision.
139
mips_c_ole_ps,
// Floating point compare ordered or less than or equal pair of single precision.
140
mips_c_ule_ps,
// Floating point compare unordered or less than or equal pair of single precision.
141
mips_c_sf_ps,
// Floating point compare signaling false pair of single precision.
142
mips_c_ngle_ps,
// Floating point compare not greater than or less than or equal pair of single precision.
143
mips_c_seq_ps,
// Floating point compare signaling equal pair of single precision.
144
mips_c_ngl_ps,
// Floating point compare not greater than or less than pair of single precision.
145
mips_c_lt_ps,
// Floating point compare less than pair of single precision.
146
mips_c_nge_ps,
// Floating point compare not greater than or equal pair of single precision.
147
mips_c_le_ps,
// Floating point compare less than or equal pair of single precision.
148
mips_c_ngt_ps,
// Floating point compare not greater than pair of single precision.
149
mips_cache,
// Perform cache operation.
150
mips_cachee,
// Perform cache operation EVA.
151
mips_ceil_l_s,
// Fixed point ceiling convert to long fixed point.
152
mips_ceil_l_d,
// Fixed point ceiling convert to long fixed point.
153
mips_ceil_w_s,
// Fixed point ceiling convert to word fixed point.
154
mips_ceil_w_d,
// Fixed point ceiling convert to word fixed point.
155
mips_cfc1,
// Move control word from floating point.
156
mips_cfc2,
// Move control word from coprocessor 2.
157
mips_clo,
// Count leading ones in word.
158
mips_clz,
// Count leading zeros in word.
159
mips_cop2,
// Coprocessor operation to coprocessor 2.
160
mips_ctc1,
// Move control word to floating point.
161
mips_ctc2,
// Move control word to coprocessor 2.
162
mips_cvt_d_s,
// Floating point convert to double floating point.
163
mips_cvt_d_w,
// Floating point convert to double floating point.
164
mips_cvt_d_l,
// Floating point convert to double floating point.
165
mips_cvt_l_s,
// Floating point convert to long fixed point.
166
mips_cvt_l_d,
// Floating point convert to long fixed point.
167
mips_cvt_ps_s,
// Floating point convert to paired single.
168
mips_cvt_s_d,
// Floating point convert to single floating point.
169
mips_cvt_s_w,
// Floating point convert to single floating point.
170
mips_cvt_s_l,
// Floating point convert to single floating point.
171
mips_cvt_s_pl,
// Floating point convert pair lower to single floating point.
172
mips_cvt_s_pu,
// Floating point convert pair upper to single floating point.
173
mips_cvt_w_s,
// Floating point convert to word fixed point.
174
mips_cvt_w_d,
// Floating point convert to word fixed point.
175
mips_di,
// Disable interrupts.
176
mips_div,
// Divide word.
177
mips_div_s,
// Floating point divide.
178
mips_div_d,
// Floating point divide.
179
mips_divu,
// Divide unsigned word.
180
mips_ehb,
// Execution hazard barrier.
181
mips_ei,
// Enable interrupts.
182
mips_eret,
// Exception return.
183
mips_ext,
// Extract bit field.
184
mips_floor_l_s,
// Floating point floor convert to long fixed point.
185
mips_floor_l_d,
// Floating point floor convert to long fixed point.
186
mips_floor_w_s,
// Floating point floor convert to word fixed point.
187
mips_floor_w_d,
// Floating point floor convert to word fixed point.
188
mips_ins,
// Insert bit field.
189
mips_j,
// Jump.
190
mips_jal,
// Jump and link.
191
mips_jalr,
// Jump and link register.
192
mips_jalr_hb,
// Jump and link register with hazard barrier.
193
mips_jalx,
// Jump and link exchange.
194
mips_jr,
// Jump register.
195
mips_jr_hb,
// Jump register with hazard barrier.
196
mips_lb,
// Load byte.
197
mips_lbe,
// Load byte EVA.
198
mips_lbu,
// Load byte unsigned.
199
mips_lbue,
// Load byte unsigned EVA.
200
mips_ldc1,
// Load doubleword to floating point.
201
mips_ldc2,
// Load doubleword to coprocessor 2.
202
mips_ldxc1,
// Load doubleword indexed to floating point.
203
mips_lh,
// Load halfword.
204
mips_lhe,
// Load halfword EVA.
205
mips_lhu,
// Load halfword unsigned.
206
mips_lhue,
// Load halfword unsigned EVA.
207
mips_ll,
// Load linked word.
208
mips_lle,
// Load linked word EVA.
209
mips_lui,
// Load upper immediate.
210
mips_luxc1,
// Load doubleword indexed unaligned to floating point.
211
mips_lw,
// Load word.
212
mips_lwc1,
// Load word to floating point.
213
mips_lwc2,
// Load word to coprocessor 2.
214
mips_lwe,
// Load word EVA.
215
mips_lwl,
// Load word left.
216
mips_lwle,
// Load word left EVA.
217
mips_lwr,
// Load word right.
218
mips_lwre,
// Load word right EVA.
219
mips_lwu,
// Load word unsigned.
220
mips_lwxc1,
// Load word indexed to floating point.
221
mips_madd,
// Multiply and add word to hi, lo.
222
mips_madd_s,
// Floating point multiply add.
223
mips_madd_d,
// Floating point multiply add.
224
mips_madd_ps,
// Floating point multiply add.
225
mips_maddu,
// Multiply and add unsigned word to hi, lo.
226
mips_mfc0,
// Move from coprocessor 0.
227
mips_mfc1,
// Move word from coprocessor 1.
228
mips_mfc2,
// Move word from coprocessor 2.
229
mips_mfhc1,
// Move word from high half of floating point register.
230
mips_mfhc2,
// Move word from high half of coprocessor 2.
231
mips_mfhi,
// Move from hi register.
232
mips_mflo,
// Move from lo register.
233
mips_mov_s,
// Floating point move.
234
mips_mov_d,
// Floating point move.
235
mips_mov_ps,
// Floating point move.
236
mips_movf,
// Move conditional on floating point false.
237
mips_movf_s,
// Floating point move conditional on floating point false.
238
mips_movf_d,
// Floating point move conditional on floating point false.
239
mips_movf_ps,
// Floating point move conditional on floating point false.
240
mips_movn,
// Move conditional on not zero.
241
mips_movn_s,
// Move floating point conditional on not zero.
242
mips_movn_d,
// Move floating point conditional on not zero.
243
mips_movn_ps,
// Move floating point conditional on not zero.
244
mips_movt,
// Move conditional on floating piont true.
245
mips_movt_s,
// Floating point move conditional on floating point true.
246
mips_movt_d,
// Floating point move conditional on floating point true.
247
mips_movt_ps,
// Floating point move conditional on floating point true.
248
mips_movz,
// Move conditional on zero.
249
mips_movz_s,
// Floating point move conditional on zero.
250
mips_movz_d,
// Floating point move conditional on zero.
251
mips_movz_ps,
// Floating point move conditional on zero.
252
mips_msub,
// Multiply and subtract word.
253
mips_msub_s,
// Floating point multiple and subtract.
254
mips_msub_d,
// Floating point multiple and subtract.
255
mips_msub_ps,
// Floating point multiple and subtract.
256
mips_msubu,
// Multiply and subtract word to hi, lo.
257
mips_mtc0,
// Move to coprocessor 0.
258
mips_mtc1,
// Move word to floating point.
259
mips_mtc2,
// Move word to coprocessor 2.
260
mips_mthc1,
// Move word to high half of floating point register.
261
mips_mthc2,
// Move word to high half of coprocessor 2 register.
262
mips_mthi,
// Move to hi register.
263
mips_mtlo,
// Move to lo register.
264
mips_mul,
// Multiply word to GPR.
265
mips_mul_s,
// Floating point multiply.
266
mips_mul_d,
// Floating point multiply.
267
mips_mul_ps,
// Floating point multiply.
268
mips_mult,
// Multiply word.
269
mips_multu,
// Multiply unsigned word.
270
mips_neg_s,
// Floating point negate.
271
mips_neg_d,
// Floating point negate.
272
mips_neg_ps,
// Floating point negate.
273
mips_nmadd_s,
// Floating point negative multiply add.
274
mips_nmadd_d,
// Floating point negative multiply add.
275
mips_nmadd_ps,
// Floating point negative multiply add.
276
mips_nmsub_s,
// Floating point negative multply subtract.
277
mips_nmsub_d,
// Floating point negative multply subtract.
278
mips_nmsub_ps,
// Floating point negative multply subtract.
279
mips_nop,
// No operation.
280
mips_nor,
// Not OR.
281
mips_or,
// Bitwise OR.
282
mips_ori,
// Bitwise OR immediate.
283
mips_pause,
// Wait for the LLBit to clear.
284
mips_pll_ps,
// Pair lower lower.
285
mips_plu_ps,
// Pair lower upper.
286
mips_pref,
// Prefetch.
287
mips_prefe,
// Prefetch EVA.
288
mips_prefx,
// Prefetch indexed.
289
mips_pul_ps,
// Pair upper lower.
290
mips_puu_ps,
// Pair upper upper.
291
mips_rdhwr,
// Read hardware register.
292
mips_rdpgpr,
// Read GPR from previous shadow set.
293
mips_recip_s,
// Reciprocal approximation.
294
mips_recip_d,
// Reciprocal approximation.
295
mips_rotr,
// Rotate word right.
296
mips_rotrv,
// Rotate word right variable.
297
mips_round_l_s,
// Floating point round to long fixed point.
298
mips_round_l_d,
// Floating point round to long fixed point.
299
mips_round_w_s,
// Floating point round to word fixed point.
300
mips_round_w_d,
// Floating point round to word fixed point.
301
mips_rsqrt_s,
// Reciprocal square root approximation.
302
mips_rsqrt_d,
// Reciprocal square root approximation.
303
mips_sb,
// Store byte.
304
mips_sbe,
// Store byte EVA.
305
mips_sc,
// Store conditional word.
306
mips_sce,
// Store conditional word EVA.
307
mips_sdc1,
// Store doubleword from floating point.
308
mips_sdc2,
// Store doubleword from coprocessor 2.
309
mips_sdxc1,
// Store doubleword indexed from floating point.
310
mips_seb,
// Sign extend byte.
311
mips_seh,
// Sign extend halfword.
312
mips_sh,
// Store halfword.
313
mips_she,
// Store halfword EVA.
314
mips_sll,
// Shift word left logical.
315
mips_sllv,
// Shift word left logical variable.
316
mips_slt,
// Set on less than.
317
mips_slti,
// Set on less than immediate.
318
mips_sltiu,
// Set on less than immediate unsigned.
319
mips_sltu,
// Set on less than unsigned.
320
mips_sqrt_s,
// Floating point square root.
321
mips_sqrt_d,
// Floating point square root.
322
mips_sra,
// Shift word right arithmetic.
323
mips_srav,
// Shift word right arithmetic variable.
324
mips_srl,
// Shift right logical.
325
mips_srlv,
// Shift right logical value.
326
mips_ssnop,
// Superscalar no operation.
327
mips_sub,
// Subtract word.
328
mips_sub_s,
// Subtract floating point.
329
mips_sub_d,
// Subtract floating point.
330
mips_sub_ps,
// Subtract floating point.
331
mips_subu,
// Subtract unsigned word.
332
mips_suxc1,
// Store doubleword indexed unaligned from floating point.
333
mips_sw,
// Store word.
334
mips_swc1,
// Store word from floating point.
335
mips_swc2,
// Store word from coprocessor 2.
336
mips_swe,
// Store word EVA.
337
mips_swl,
// Store word left.
338
mips_swle,
// Store word left EVA.
339
mips_swr,
// Store word right.
340
mips_swre,
// Store word right EVA.
341
mips_swxc1,
// Store word indexed from floating point.
342
mips_sync,
// Synchronize.
343
mips_synci,
// Synchronize caches to make instruction writes effective.
344
mips_syscall,
// System call.
345
mips_teq,
// Trap if equal.
346
mips_teqi,
// Trap if equal immediate.
347
mips_tge,
// Trap if greater or equal.
348
mips_tgei,
// Trap if greater or equal immediate.
349
mips_tgeiu,
// Trap if greater or equal immediate unsigned.
350
mips_tgeu,
// Trap if greater or equal unsigned.
351
mips_tlbinv,
// TLB invalidate.
352
mips_tlbinvf,
// TLB invalidate flush.
353
mips_tlbp,
// Probe TLB for matching entry.
354
mips_tlbr,
// Read indexed TLB entry.
355
mips_tlbwi,
// Write indexed TLB entry.
356
mips_tlbwr,
// Write random TLB entry.
357
mips_tlt,
// Trap if less than.
358
mips_tlti,
// Trap if less than immediate.
359
mips_tltiu,
// Trap if less than immediate unsigned.
360
mips_tltu,
// Trap if less than unsigned.
361
mips_tne,
// Trap if not equal.
362
mips_tnei,
// Trap if not equal immediate.
363
mips_trunc_l_s,
// Floating point truncate to long fixed point.
364
mips_trunc_l_d,
// Floating point truncate to long fixed point.
365
mips_trunc_w_s,
// Floating point truncate to word fixed point.
366
mips_trunc_w_d,
// Floating point truncate to word fixed point.
367
mips_wait,
// Enter standby mode.
368
mips_wrpgpr,
// Write to GPR in previous shadow set.
369
mips_wsbh,
// Word swap bytes within halfwords.
370
mips_xor,
// Exclusive OR.
371
mips_xori,
// Exclusive OR immediate.
372
373
mips_last_instruction
// must be last enum member
374
};
375
376
}
// namespace
377
}
// namespace
378
379
#endif
380
#endif
Rose
The ROSE library.
Definition
BinaryTutorial.dox:3
Generated on Mon Sep 30 2024 03:25:28 for ROSE by
1.9.8