Rizin
unix-like reverse engineering framework and cli tools
vle.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2017-2021 deroad <wargio@libero.it>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 #include "vle.h"
4 #include "vle_internal.h"
5 #include <rz_analysis.h>
6 
7 #define USE_INTERNAL_PPC(x) ((x)->options & VLE_INTERNAL_PPC)
8 
9 #define E_NONE 0
10 #define E_BD15 1
11 #define E_BD15b 2
12 #define E_BD15c 3
13 #define E_BD24 4
14 #define E_D 5
15 #define E_D8 6
16 #define E_D8_N 7
17 #define E_I16A 8
18 #define E_I16L 9
19 #define E_I16LS 10
20 #define E_IA16 11
21 #define E_IA16U 12
22 #define E_LI20 13
23 #define E_M 14
24 #define E_SCI8 15
25 #define E_SCI8CR 16
26 #define E_SCI8I 17
27 #define E_X 18
28 #define E_XCR 19
29 #define E_XL 20
30 #define E_XLSP 21
31 #define E_XRA 22
32 
33 #define E_MASK_X 0x03FFF800
34 #define E_MASK_XL 0x03FFF801
35 #define E_MASK_D 0x03FFFFFF
36 #define E_MASK_D8 0x03FF00FF
37 #define E_MASK_I16A 0x03FF07FF
38 #define E_MASK_SCI8 0x03FF07FF
39 #define E_MASK_I16L 0x03FF07FF
40 #define E_MASK_BD24 0x03FFFFFE
41 #define E_MASK_BD15 0x000CFFFE
42 #define E_MASK_IA16 0x03FF07FF
43 #define E_MASK_LI20 0x03FF7FFF
44 #define E_MASK_M 0x03FFFFFE
45 
46 #define F_NONE 0
47 #define F_X 1
48 #define F_XO 2
49 #define F_EVX 3
50 #define F_CMP 4
51 #define F_DCBF 5
52 #define F_DCBL 6
53 #define F_DCI 7
54 #define F_EXT 8
55 #define F_A 9
56 #define F_XFX 10
57 #define F_XER 11
58 #define F_MFPR 12
59 #define F_MTPR 13
60 #define F_X_EI 14
61 #define F_XRA 15
62 
63 #define F_MASK_X 0x03FFF800
64 #define F_MASK_XO 0x03FFF800
65 #define F_MASK_EVX 0x03FFF800
66 #define F_MASK_CMP 0x039FF800
67 #define F_MASK_DCBF 0x00FFF800
68 #define F_MASK_DCBL 0x01FFF800
69 #define F_MASK_DCI 0x00FFF800
70 #define F_MASK_EXT 0x03FF0000
71 #define F_MASK_A 0x01FFFFC0
72 #define F_MASK_XFX 0x03FFF800
73 #define F_MASK_XER 0x03FFF800
74 #define F_MASK_MFPR 0x03FFF800
75 #define F_MASK_MTPR 0x03FFF800
76 
77 const ppc_t ppc_ops[] = {
78  // { "name" , op , mask , type , op_type , RZ_TYPE_COND_AL, {TYPE_REG, TYPE_REG, TYPE_REG, TYPE_REG, TYPE_REG}}
79  { "add", 0x7C000214, 0x7C000214 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
80  { "add.", 0x7C000214, 0x7C000211 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
81  { "addc", 0x7C000014, 0x7C000014 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
82  { "addc.", 0x7C000014, 0x7C000011 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
83  { "addco", 0x7C000014, 0x7C000414 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
84  { "addco.", 0x7C000014, 0x7C000415 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
85  { "adde", 0x7C000114, 0x7C000114 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
86  { "adde.", 0x7C000114, 0x7C000111 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
87  { "addeo", 0x7C000114, 0x7C000514 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
88  { "addeo.", 0x7C000114, 0x7C000515 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
89  { "addme", 0x7C0001D4, 0x7C0001D4 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
90  { "addme.", 0x7C0001D4, 0x7C0001D1 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
91  { "addmeo", 0x7C0001D4, 0x7C0005D4 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
92  { "addmeo.", 0x7C0001D4, 0x7C0005D5 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
93  { "addo", 0x7C000214, 0x7C000614 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
94  { "addo.", 0x7C000214, 0x7C000615 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
95  { "addze", 0x7C000194, 0x7C000194 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
96  { "addze.", 0x7C000194, 0x7C000191 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
97  { "addzeo", 0x7C000194, 0x7C000594 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
98  { "addzeo.", 0x7C000194, 0x7C000595 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
99  { "and", 0x7C000038, 0x7C000038 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
100  { "and.", 0x7C000038, 0x7C000039 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
101  { "andc", 0x7C000078, 0x7C000078 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
102  { "andc.", 0x7C000078, 0x7C000079 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
103  { "brinc", 0x1000020F, 0x1000020F | F_MASK_EVX, F_EVX, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
104  { "cmp", 0x7C000000, 0x7C000000 | F_MASK_CMP, F_CMP, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
105  { "cmpl", 0x7C000040, 0x7C000040 | F_MASK_CMP, F_CMP, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
106  { "cntlzd", 0x7C000074, 0x7C000074 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
107  { "cntlzd.", 0x7C000074, 0x7C000075 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
108  { "cntlzw", 0x7C000034, 0x7C000034 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
109  { "cntlzw.", 0x7C000034, 0x7C000035 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
110  { "dcba", 0x7C0005EC, 0x7C0005EC | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
111  { "dcbf", 0x7C0000AC, 0x7C0000AC | F_MASK_DCBF, F_DCBF, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
112  { "dcbfep", 0x7C0000FE, 0x7C0000FE | F_MASK_DCBF, F_DCBF, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
113  { "dcbi", 0x7C0003AC, 0x7C0003AC | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
114  { "dcblc", 0x7C00030C, 0x7C00030C | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
115  { "dcbst", 0x7C00006C, 0x7C00006C | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
116  { "dcbt", 0x7C00022C, 0x7C00022C | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
117  { "dcbtep", 0x7C00027E, 0x7C00027E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
118  { "dcbtls", 0x7C00014C, 0x7C00014C | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
119  { "dcbtst", 0x7C0001EC, 0x7C0001EC | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
120  { "dcbtstep", 0x7C0001FE, 0x7C0001FE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
121  { "dcbtstls", 0x7C00010C, 0x7C00010C | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
122  { "dcbz", 0x7C0007EC, 0x7C0007EC | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
123  { "dcbzep", 0x7C0007FE, 0x7C0007FE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
124  { "dci", 0x7C00038C, 0x7C00038C | F_MASK_DCI, F_DCI, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
125  { "dcread", 0x7C00028C, 0x7C00028C | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
126  { "dcread", 0x7C0003CC, 0x7C0003CC | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
127  { "divw", 0x7C0003D6, 0x7C0003D6 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
128  { "divw.", 0x7C0003D6, 0x7C0003D7 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
129  { "divwo", 0x7C0003D6, 0x7C0007D6 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
130  { "divwo.", 0x7C0003D6, 0x7C0007D7 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
131  { "divwu", 0x7C000396, 0x7C000396 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
132  { "divwu.", 0x7C000396, 0x7C000397 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
133  { "divwuo", 0x7C000396, 0x7C000796 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
134  { "divwuo.", 0x7C000396, 0x7C000797 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_DIV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
135  { "extsb", 0x7C000774, 0x7C000774 | F_MASK_EXT, F_EXT, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
136  { "extsb.", 0x7C000774, 0x7C000775 | F_MASK_EXT, F_EXT, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
137  { "extsw", 0x7C000734, 0x7C000734 | F_MASK_EXT, F_EXT, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
138  { "extsw.", 0x7C000734, 0x7C000735 | F_MASK_EXT, F_EXT, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
139  { "icbi", 0x7C0007AC, 0x7C0007AC | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
140  { "icbiep", 0x7C0007BE, 0x7C0007BE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
141  { "icblc", 0x7C0001CC, 0x7C0001CC | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
142  { "icbt", 0x7C00002C, 0x7C00002C | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
143  { "icbtls", 0x7C0003CC, 0x7C0003CC | F_MASK_DCBL, F_DCBL, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
144  { "ici", 0x7C00078C, 0x7C00078C | F_MASK_DCI, F_DCI, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
145  { "icread", 0x7C0007CC, 0x7C0007CC | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_IO, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
146  // apply only X instead of A for lt, gt, eq
147  { "isel", 0x7C00001E, 0x7C00001E | F_MASK_A, F_A, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
148  { "iseleq", 0x7C00001E, 0x7C00009E | F_MASK_X, F_A, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
149  { "iselgt", 0x7C00001E, 0x7C00005E | F_MASK_X, F_A, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
150  { "isellt", 0x7C00001E, 0x7C00001E | F_MASK_X, F_A, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
151  { "lbepx", 0x7C0000BE, 0x7C0000BE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
152  { "lbzux", 0x7C0000EE, 0x7C0000EE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
153  { "lbzux", 0x7C0000EE, 0x7C0000EE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
154  { "lbzx", 0x7C0000AE, 0x7C0000AE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
155  { "lhaux", 0x7C0002EE, 0x7C0002EE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
156  { "lhax", 0x7C0002AE, 0x7C0002AE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
157  { "lhbrx", 0x7C00062C, 0x7C00062C | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
158  { "lhepx", 0x7C00023E, 0x7C00023E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
159  { "lhzux", 0x7C00026E, 0x7C00026E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
160  { "lhzx", 0x7C00022E, 0x7C00022E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
161  { "lswi", 0x7C0004AA, 0x7C0004AA | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
162  { "lswx", 0x7C00042A, 0x7C00042A | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
163  { "lwarx", 0x7C000028, 0x7C000028 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
164  { "lwarx.", 0x7C000029, 0x7C000029 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
165  { "lwbrx", 0x7C00042C, 0x7C00042C | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
166  { "lwepx", 0x7C00003E, 0x7C00003E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
167  { "lwzux", 0x7C00006E, 0x7C00006E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
168  { "lwzx", 0x7C00002E, 0x7C00002E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
169  { "mbar", 0x7C0006AC, 0x7C0006AC | F_MASK_XFX, F_XFX, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
170  { "mfctr", 0x7C0902A6, 0x7C1902A6 | F_MASK_MTPR, F_MTPR, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
171  { "mtctr", 0x7C0903A6, 0x7C1903A6 | F_MASK_MTPR, F_MTPR, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
172  { "mcrxr", 0x7C000400, 0x7C000400 | F_MASK_XER, F_XER, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
173  { "mfcr", 0x7C000026, 0x7C000026 | E_MASK_XL, F_XFX, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
174  { "mfdcr", 0x7C000286, 0x7C000286 | F_MASK_MFPR, F_MFPR, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
175  { "mfdcrux", 0x7C000246, 0x7C000246 | F_MASK_EXT, F_EXT, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
176  { "mfdcrx", 0x7C000206, 0x7C000206 | F_MASK_EXT, F_EXT, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
177  { "mfmsr", 0x7C0000A6, 0x7C0000A6 | F_MASK_XFX, F_XFX, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
178  { "mfpmr", 0x7C00029C, 0x7C00029C | F_MASK_XFX, F_XFX, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
179  { "mfspr", 0x7C0002A6, 0x7C0002A6 | F_MASK_MFPR, F_MFPR, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
180  { "msync", 0x7C0004AC, 0x7C0004AC | F_MASK_XFX, F_XFX, RZ_ANALYSIS_OP_TYPE_SYNC, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
181  { "mtcrf", 0x7C000120, 0x7C000120 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
182  { "mtmsr", 0x7C000124, 0x7C000124 | F_MASK_XFX, F_XFX, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
183  { "mtspr", 0x7C0003A6, 0x7C0003A6 | F_MASK_MTPR, F_MTPR, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
184  { "mulhw", 0x7C000096, 0x7C000096 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
185  { "mulhw.", 0x7C000096, 0x7C000097 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
186  { "mulhwu", 0x7C000016, 0x7C000016 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
187  { "mulhwu.", 0x7C000016, 0x7C000017 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
188  { "mullw", 0x7C0001D6, 0x7C0001D6 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
189  { "mullw.", 0x7C0001D6, 0x7C0001D7 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
190  { "nand", 0x7C0003B8, 0x7C0003B8 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
191  { "nand.", 0x7C0003B9, 0x7C0003B9 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
192  { "neg", 0x7C0000D0, 0x7C0000D0 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_CPL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
193  { "neg.", 0x7C0000D0, 0x7C0000D1 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_CPL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
194  { "nego", 0x7C0004D0, 0x7C0004D0 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_CPL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
195  { "nego.", 0x7C0004D0, 0x7C0004D1 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_CPL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
196  { "nor", 0x7C0000F8, 0x7C0000F8 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_NOR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
197  { "nor.", 0x7C0000F8, 0x7C0000F9 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_NOR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
198  { "or", 0x7C000378, 0x7C000378 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
199  { "or.", 0x7C000378, 0x7C000379 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
200  { "orc", 0x7C000338, 0x7C000338 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
201  { "orc.", 0x7C000338, 0x7C000339 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
202  { "slw", 0x7C000030, 0x7C000030 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
203  { "slw.", 0x7C000030, 0x7C000031 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
204  { "sraw", 0x7C000630, 0x7C000630 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
205  { "sraw.", 0x7C000630, 0x7C000631 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
206  { "srawi", 0x7C000670, 0x7C000670 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
207  { "srawi.", 0x7C000670, 0x7C000671 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
208  { "srw", 0x7C000430, 0x7C000430 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
209  { "srw.", 0x7C000430, 0x7C000431 | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
210  { "stbux", 0x7C0001EE, 0x7C0001EE | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
211  { "stbx", 0x7C0001AE, 0x7C0001AE | E_MASK_XL, F_X, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
212  { "sthux", 0x7C00036E, 0x7C00036E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
213  { "sthx", 0x7C00032E, 0x7C00032E | F_MASK_X, F_X, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
214  { "stwux", 0x7C00016E, 0x7C00016E | E_MASK_XL, F_X, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
215  { "stwx", 0x7C00012E, 0x7C00012E | E_MASK_XL, F_X, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
216  { "subf", 0x7C000050, 0x7C000050 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
217  { "subf.", 0x7C000050, 0x7C000051 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
218  { "subfc", 0x7C000010, 0x7C000010 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
219  { "subfc.", 0x7C000010, 0x7C000011 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
220  { "subfco", 0x7C000410, 0x7C000410 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
221  { "subfco.", 0x7C000410, 0x7C000411 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
222  { "subfe", 0x7C000110, 0x7C000110 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
223  { "subfe.", 0x7C000110, 0x7C000111 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
224  { "subfeo", 0x7C000510, 0x7C000510 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
225  { "subfeo.", 0x7C000510, 0x7C000511 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
226  { "subfo", 0x7C000050, 0x7C000450 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
227  { "subfo.", 0x7C000050, 0x7C000451 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
228  { "subfze", 0x7C000190, 0x7C000190 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
229  { "subfze.", 0x7C000190, 0x7C000191 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
230  { "subfzeo", 0x7C000590, 0x7C000590 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
231  { "subfzeo.", 0x7C000590, 0x7C000591 | F_MASK_XO, F_XO, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
232  { "tlbre", 0x7C000764, 0x7C000764 | F_MASK_XFX, F_NONE, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
233  { "tlbwe", 0x7C0007A4, 0x7C0007A4 | F_MASK_XFX, F_NONE, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
234  { "wrtee", 0x7C000106, 0x7C000106 | E_MASK_XL, F_X, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
235  { "wrteei", 0x7C000146, 0x7C000146 | E_MASK_XL, F_X_EI, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
236  { "xor", 0x7C000278, 0x7C000278 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_XOR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
237  { "xor.", 0x7C000279, 0x7C000279 | F_MASK_X, F_XRA, RZ_ANALYSIS_OP_TYPE_XOR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
238 };
239 
240 const e_vle_t e_ops[] = {
241  // { "name" , op , mask , type , op_type , RZ_TYPE_COND_AL, {TYPE_REG, TYPE_REG, TYPE_REG, TYPE_REG, TYPE_REG}}
242  { "e_add16i", 0x1C000000, 0x1F000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
243  { "e_add2i.", 0x70008800, 0x70008800 | E_MASK_I16A, E_I16A, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
244  { "e_add2is", 0x70009000, 0x70009000 | E_MASK_I16A, E_I16A, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
245  { "e_addi", 0x18008000, 0x18008000 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
246  { "e_addi.", 0x18008800, 0x18008800 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
247  { "e_addic", 0x18009000, 0x18009000 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
248  { "e_addic.", 0x18009800, 0x18009800 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
249  { "e_and2i.", 0x7000C800, 0x7000C800 | E_MASK_I16L, E_I16L, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
250  { "e_and2is.", 0x7000E800, 0x7000E800 | E_MASK_I16L, E_I16LS, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
251  { "e_andi", 0x1800C000, 0x1800C000 | E_MASK_SCI8, E_SCI8I, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
252  { "e_andi.", 0x1800C800, 0x1800C800 | E_MASK_SCI8, E_SCI8I, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
253  // has cr0-cr3
254  { "e_beq", 0x7A000000, 0x7A120000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_EQ, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
255  { "e_bge", 0x7A000000, 0x7A000000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_GE, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
256  { "e_bgt", 0x7A000000, 0x7A110000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_GT, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
257  { "e_ble", 0x7A000000, 0x7A010000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_LE, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
258  { "e_blt", 0x7A000000, 0x7A100000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_LT, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
259  { "e_bne", 0x7A000000, 0x7A020000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_NE, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
260  { "e_bns", 0x7A000000, 0x7A030000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_VC, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
261  { "e_bso", 0x7A000000, 0x7A130000 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_VS, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
263  { "e_bgel", 0x7A000001, 0x7A000001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_EQ, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
264  { "e_blel", 0x7A000001, 0x7A010001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_GE, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
265  { "e_bnel", 0x7A000001, 0x7A020001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_GT, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
266  { "e_bnsl", 0x7A000001, 0x7A030001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_LE, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
267  { "e_bltl", 0x7A000001, 0x7A110001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_LT, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
268  { "e_bgtl", 0x7A000001, 0x7A120001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_NE, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
269  { "e_beql", 0x7A000001, 0x7A130001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_VC, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
270  { "e_bsol", 0x7A000001, 0x7A140001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_VS, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
271  { "e_bcl", 0x7A000001, 0x7A140001 | E_MASK_BD15, E_BD15, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_TYPE_COND_VS, { TYPE_CR, TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
272  // has cr0-cr3
273  { "e_bdnz", 0x7A200000, 0x7A200000 | E_MASK_BD15, E_BD15c, RZ_ANALYSIS_OP_TYPE_JMP, RZ_TYPE_COND_AL, { TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
274  { "e_bdnzl", 0x7A200001, 0x7A200001 | E_MASK_BD15, E_BD15c, RZ_ANALYSIS_OP_TYPE_CALL, RZ_TYPE_COND_AL, { TYPE_JMP, TYPE_NONE, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
279  { "e_cmp16i", 0x70009800, 0x70009800 | E_MASK_IA16, E_IA16, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
280  { "e_cmph", 0x7C00001C, 0x7C00001D | E_MASK_X, E_XCR, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
281  { "e_cmph16i", 0x7000B000, 0x7000B000 | E_MASK_IA16, E_IA16, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
282  { "e_cmphl", 0x7C00005C, 0x7C00005D | E_MASK_X, E_XCR, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
283  { "e_cmphl16i", 0x7000B800, 0x7000B800 | E_MASK_IA16, E_IA16U, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
284  { "e_cmpl16i", 0x7000A800, 0x7000A800 | E_MASK_IA16, E_IA16U, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
285  { "e_cmpli", 0x1880A800, 0x1880A800 | E_MASK_SCI8, E_SCI8CR, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
286  { "e_cmpi", 0x1800A800, 0x1800A800 | E_MASK_SCI8, E_SCI8CR, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
287  { "e_crand", 0x7C000202, 0x7C000202 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
288  { "e_crandc", 0x7C000102, 0x7C000102 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
289  { "e_creqv", 0x7C000242, 0x7C000242 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
290  { "e_crnand", 0x7C0001C2, 0x7C0001C2 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
291  { "e_crnor", 0x7C000042, 0x7C000042 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_NOR, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
292  { "e_cror", 0x7C000382, 0x7C000382 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
293  { "e_crorc", 0x7C000342, 0x7C000342 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
294  { "e_crxor", 0x7C000182, 0x7C000182 | E_MASK_XL, E_XL, RZ_ANALYSIS_OP_TYPE_XOR, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE } },
295  { "e_lbz", 0x30000000, 0x30000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
296  { "e_lbzu", 0x18000000, 0x18000000 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
297  { "e_lha", 0x38000000, 0x38000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
298  { "e_lhau", 0x18000300, 0x18000300 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
299  { "e_lhz", 0x58000000, 0x58000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
300  { "e_lhzu", 0x18000100, 0x18000100 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
303  { "e_lmw", 0x18000800, 0x18000800 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
304  { "e_lwz", 0x50000000, 0x53000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
305  { "e_lwzu", 0x18000200, 0x18000200 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
306  { "e_mcrf", 0x7C000020, 0x7C000020 | E_MASK_XL, E_XLSP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { TYPE_CR, TYPE_CR, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
307  { "e_mull2i", 0x7000A000, 0x7000A000 | E_MASK_I16A, E_I16A, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_IMM, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
308  { "e_mulli", 0x1800A000, 0x1800A000 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
309  { "e_or2i", 0x7000C000, 0x7000C000 | E_MASK_I16L, E_I16L, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
310  { "e_or2is", 0x7000D000, 0x7000D000 | E_MASK_I16L, E_I16LS, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
311  { "e_ori", 0x1800D000, 0x1800D000 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
312  { "e_ori.", 0x1800D800, 0x1800D800 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
313  { "e_rlw", 0x7C000230, 0x7C000230 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
314  { "e_rlw.", 0x7C000231, 0x7C000231 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_REG, TYPE_NONE, TYPE_NONE } },
315  { "e_rlwi", 0x7C000270, 0x7C000270 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
316  { "e_rlwi.", 0x7C000271, 0x7C000271 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
317  { "e_rlwimi", 0x74000000, 0x74000000 | E_MASK_M, E_M, RZ_ANALYSIS_OP_TYPE_ROR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
318  { "e_rlwinm", 0x74000001, 0x74000001 | E_MASK_M, E_M, RZ_ANALYSIS_OP_TYPE_ROR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
319  { "e_slwi", 0x7C000070, 0x7C000070 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
320  { "e_slwi.", 0x7C000071, 0x7C000071 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHL, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
321  { "e_srwi", 0x7C000470, 0x7C000470 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
322  { "e_srwi.", 0x7C000471, 0x7C000471 | E_MASK_X, E_XRA, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_NONE, TYPE_NONE } },
323  { "e_stb", 0x34000000, 0x34000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
324  { "e_stbu", 0x18000400, 0x18000400 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
325  { "e_sth", 0x5C000000, 0x5C000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
326  { "e_sthu", 0x18000500, 0x18000500 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
327  { "e_stmw", 0x18000900, 0x18000900 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
328  { "e_stw", 0x54000000, 0x56000000 | E_MASK_D, E_D, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
329  { "e_stwu", 0x18000600, 0x18000600 | E_MASK_D8, E_D8, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE } },
330  { "e_subfic", 0x1800B000, 0x1800B000 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
331  { "e_subfic.", 0x1800B800, 0x1800B800 | E_MASK_SCI8, E_SCI8, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
332  { "e_xori", 0x1800E000, 0x1800E000 | E_MASK_SCI8, E_SCI8I, RZ_ANALYSIS_OP_TYPE_XOR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
333  { "e_xori.", 0x1800E800, 0x1800E800 | E_MASK_SCI8, E_SCI8I, RZ_ANALYSIS_OP_TYPE_XOR, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_REG, TYPE_IMM, TYPE_IMM, TYPE_IMM } },
334  // VLE Instructions for Improving Interrupt Handler Efficiency (e200z760RM.pdf)
335  { "e_ldmvcsrrw", 0x18A01000, 0x18A01000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
336  { "e_ldmvdsrrw", 0x18C01000, 0x18C01000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
337  { "e_ldmvgprw", 0x18001000, 0x18001000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
338  { "e_ldmvsprw", 0x18201000, 0x18201000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
339  { "e_ldmvsrrw", 0x18801000, 0x18801000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
340  { "e_lmvcsrrw", 0x18A01000, 0x18A01000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
341  { "e_lmvdsrrw", 0x18C01000, 0x18C01000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
342  { "e_lmvgprw", 0x18001000, 0x18001000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
343  { "e_lmvmcsrrw", 0x18E01000, 0x18E01000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
344  { "e_lmvsprw", 0x18201000, 0x18201000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
345  { "e_lmvsrrw", 0x18801000, 0x18801000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
346  { "e_stmvcsrrw", 0x18A01100, 0x18A01100 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
347  { "e_stmvdsrrw", 0x18C01100, 0x18C01100 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
348  { "e_stmvgprw", 0x18001100, 0x18001100 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
349  { "e_stmvmcsrrw", 0x18E01100, 0x18E01000 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
350  { "e_stmvsprw", 0x18201100, 0x18201100 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
351  { "e_stmvsrrw", 0x18801100, 0x18801100 | E_MASK_D8, E_D8_N, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { TYPE_REG, TYPE_MEM, TYPE_NONE, TYPE_NONE, TYPE_NONE } },
352 };
353 
354 const se_vle_t se_ops[] = {
355  // { "name" , op , mask , n, op_type , RZ_TYPE_COND_AL, {{field ,shl,shr, +, i, TYPE_REG}, ...}
356  { "se_illegal", 0x0000, 0x0000, 0, RZ_ANALYSIS_OP_TYPE_ILL, RZ_TYPE_COND_NV, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
357  { "se_isync", 0x0001, 0x0001, 0, RZ_ANALYSIS_OP_TYPE_SYNC, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
358  { "se_sc", 0x0002, 0x0002, 0, RZ_ANALYSIS_OP_TYPE_SWI, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
359  { "se_blr", 0x0004, 0x0004, 0, RZ_ANALYSIS_OP_TYPE_RET, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
360  { "se_blrl", 0x0005, 0x0005, 0, RZ_ANALYSIS_OP_TYPE_RET, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
361  { "se_bctr", 0x0006, 0x0006, 0, RZ_ANALYSIS_OP_TYPE_RJMP, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
362  { "se_bctrl", 0x0007, 0x0007, 0, RZ_ANALYSIS_OP_TYPE_RCALL, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
363  { "se_rfi", 0x0008, 0x0008, 0, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
364  { "se_rfci", 0x0009, 0x0009, 0, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
365  { "se_rfdi", 0x000A, 0x000A, 0, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_TYPE_COND_AL, { { 0 }, { 0 }, { 0 }, { 0 }, { 0 } } },
366  { "se_not", 0x0020, 0x002F, 1, RZ_ANALYSIS_OP_TYPE_NOT, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
367  { "se_neg", 0x0030, 0x003F, 1, RZ_ANALYSIS_OP_TYPE_NOT, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
368  { "se_mflr", 0x0080, 0x008F, 1, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
369  { "se_mtlr", 0x0090, 0x009F, 1, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
370  { "se_mfctr", 0x00A0, 0x00AF, 1, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
371  { "se_mtctr", 0x00B0, 0x00BF, 1, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
372  { "se_extzb", 0x00C0, 0x00CF, 1, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
373  { "se_extsb", 0x00D0, 0x00DF, 1, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
374  { "se_extzh", 0x00E0, 0x00EF, 1, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
375  { "se_extsh", 0x00F0, 0x00FF, 1, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 }, { 0 } } },
376  { "se_mr", 0x0100, 0x01FF, 2, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
377  { "se_mtar", 0x0200, 0x02FF, 2, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 8, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
378  { "se_mfar", 0x0300, 0x03FF, 2, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 8, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
379  { "se_add", 0x0400, 0x04FF, 2, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
380  { "se_mullw", 0x0500, 0x05FF, 2, RZ_ANALYSIS_OP_TYPE_MUL, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
381  { "se_sub", 0x0600, 0x06FF, 2, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
382  { "se_subf", 0x0700, 0x07FF, 2, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
383  { "se_cmp", 0x0C00, 0x0CFF, 2, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
384  { "se_cmpl", 0x0D00, 0x0DFF, 2, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
385  { "se_cmph", 0x0E00, 0x0EFF, 2, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
386  { "se_cmphl", 0x0F00, 0x0FFF, 2, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
387  { "se_addi", 0x2000, 0x21FF, 2, RZ_ANALYSIS_OP_TYPE_ADD, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 1, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
388  { "se_and", 0x4600, 0x46FF, 2, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
389  { "se_and.", 0x4700, 0x47FF, 2, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
390  { "se_andi", 0x2E00, 0x2FFF, 2, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
391  { "se_andc", 0x4500, 0x45FF, 2, RZ_ANALYSIS_OP_TYPE_AND, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
392  { "se_b", 0xE800, 0xE8FF, 1, RZ_ANALYSIS_OP_TYPE_JMP, RZ_TYPE_COND_AL, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
393  { "se_bl", 0xE900, 0xE9FF, 1, RZ_ANALYSIS_OP_TYPE_CALL, RZ_TYPE_COND_AL, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
394  // cr0
395  { "se_beq", 0xE000, 0xE6FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_EQ, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
396  { "se_bge", 0xE000, 0xE0FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_GE, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
397  { "se_bgt", 0xE000, 0xE5FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_GT, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
398  { "se_ble", 0xE000, 0xE1FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_LE, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
399  { "se_blt", 0xE000, 0xE4FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_LT, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
400  { "se_bne", 0xE000, 0xE2FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_NE, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
401  { "se_bns", 0xE000, 0xE3FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_VC, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
402  { "se_bso", 0xE000, 0xE7FF, 1, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_VS, { { 0x00FF, 0, 1, 0, 0, TYPE_JMP }, { 0 }, { 0 }, { 0 }, { 0 } } },
403  { "se_bc", 0xE000, 0xE7FF, 2, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_VS, { { 0x0700, 8, 0, 32, 0, TYPE_JMP }, { 0x00FF, 0, 1, 0, 1, TYPE_IMM }, { 0 }, { 0 }, { 0 } } },
404  { "se_bclri", 0x6000, 0x61FF, 2, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
405  { "se_bgeni", 0x6200, 0x63FF, 2, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
406  { "se_bmaski", 0x2C00, 0x2DFF, 2, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
407  { "se_bseti", 0x6400, 0x65FF, 2, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
408  { "se_btsti", 0x6600, 0x67FF, 2, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
409  { "se_cmpi", 0x2A00, 0x2BFF, 2, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
410  { "se_cmpli", 0x2200, 0x23FF, 2, RZ_ANALYSIS_OP_TYPE_CMP, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 1, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
411  { "se_lbz", 0x8000, 0x8FFF, 3, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { { 0x0F00, 8, 0, 0, 2, TYPE_MEM }, { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 1, TYPE_REG }, { 0 }, { 0 } } },
412  { "se_lbh", 0xA000, 0xAFFF, 3, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { { 0x0F00, 7, 0, 0, 2, TYPE_MEM }, { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 1, TYPE_REG }, { 0 }, { 0 } } },
413  { "se_li", 0x4800, 0x4FFF, 2, RZ_ANALYSIS_OP_TYPE_MOV, RZ_TYPE_COND_AL, { { 0x07F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
414  { "se_lwz", 0xC000, 0xCFFF, 3, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_TYPE_COND_AL, { { 0x0F00, 6, 0, 0, 2, TYPE_MEM }, { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 1, TYPE_REG }, { 0 }, { 0 } } },
415  { "se_or", 0x4400, 0x44FF, 2, RZ_ANALYSIS_OP_TYPE_OR, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 1, TYPE_REG }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
416  { "se_slw", 0x4200, 0x42FF, 2, RZ_ANALYSIS_OP_TYPE_SHL, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 2, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
417  { "se_slwi", 0x6C00, 0x6DFF, 2, RZ_ANALYSIS_OP_TYPE_SHL, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
418  { "se_sraw", 0x4100, 0x41FF, 2, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 2, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
419  { "se_srawi", 0x6A00, 0x6BFF, 2, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
420  { "se_srw", 0x4000, 0x40FF, 2, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 2, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
421  { "se_srwi", 0x6800, 0x69FF, 2, RZ_ANALYSIS_OP_TYPE_SHR, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 0, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
422  { "se_stb", 0x9000, 0x9FFF, 3, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { { 0x0F00, 8, 0, 0, 2, TYPE_MEM }, { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 1, TYPE_REG }, { 0 }, { 0 } } },
423  { "se_sth", 0xB000, 0xBFFF, 3, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { { 0x0F00, 7, 0, 0, 2, TYPE_MEM }, { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 1, TYPE_REG }, { 0 }, { 0 } } },
424  { "se_stw", 0xD000, 0xDFFF, 3, RZ_ANALYSIS_OP_TYPE_STORE, RZ_TYPE_COND_AL, { { 0x0F00, 6, 0, 0, 2, TYPE_MEM }, { 0x00F0, 4, 0, 0, 0, TYPE_REG }, { 0x000F, 0, 0, 0, 1, TYPE_REG }, { 0 }, { 0 } } },
425  { "se_subi", 0x2400, 0x25FF, 2, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 1, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
426  { "se_subi.", 0x2600, 0x27FF, 2, RZ_ANALYSIS_OP_TYPE_SUB, RZ_TYPE_COND_AL, { { 0x01F0, 4, 0, 1, 1, TYPE_IMM }, { 0x000F, 0, 0, 0, 0, TYPE_REG }, { 0 }, { 0 }, { 0 } } },
427 };
428 
429 static void set_e_fields(vle_t *v, const e_vle_t *p, ut32 data) {
430  if (!v) {
431  return;
432  }
433  switch (p->type) {
434  case E_X: {
435  v->n = 3;
436  v->fields[0].value = (data & 0x3E00000) >> 21;
437  v->fields[0].type = p->types[0];
438  v->fields[1].value = (data & 0x1F0000) >> 16;
439  v->fields[1].type = p->types[1];
440  v->fields[2].value = (data & 0xF800) >> 11;
441  v->fields[2].type = p->types[2];
442  } break;
443  case E_XRA: {
444  v->n = 3;
445  v->fields[0].value = (data & 0x1F0000) >> 16;
446  v->fields[0].type = p->types[0];
447  v->fields[1].value = (data & 0x3E00000) >> 21;
448  v->fields[1].type = p->types[1];
449  v->fields[2].value = (data & 0xF800) >> 11;
450  v->fields[2].type = p->types[2];
451  } break;
452  case E_XL: {
453  v->n = 3;
454  v->fields[0].value = (data & 0x3E00000) >> 21;
455  v->fields[0].type = p->types[0];
456  v->fields[1].value = (data & 0x1F0000) >> 16;
457  v->fields[1].type = p->types[1];
458  v->fields[2].value = (data & 0xF800) >> 11;
459  v->fields[2].type = p->types[2];
460  } break;
461  case E_D: {
462  v->n = 3;
463  v->fields[0].value = (data & 0x3E00000) >> 21;
464  v->fields[0].type = p->types[0];
465  v->fields[1].value = (data & 0x1F0000) >> 16;
466  v->fields[1].type = p->types[1];
467  v->fields[2].value = data & 0xFFFF;
468  if (v->fields[2].value & 0x8000) {
469  v->fields[2].value = 0xFFFF0000 | v->fields[2].value;
470  }
471  v->fields[2].type = p->types[2];
472  } break;
473  case E_D8: {
474  v->n = 3;
475  v->fields[0].value = (data & 0x3E00000) >> 21;
476  v->fields[0].type = p->types[0];
477  v->fields[1].value = (data & 0x1F0000) >> 16;
478  v->fields[1].type = p->types[1];
479  v->fields[2].value = data & 0xFF;
480  if (v->fields[2].value & 0x80) {
481  v->fields[2].value = 0xFFFFFF00 | v->fields[2].value;
482  }
483  v->fields[2].type = p->types[2];
484  } break;
485  case E_D8_N: {
486  v->n = 2;
487  v->fields[0].value = (data & 0x1F0000) >> 16;
488  v->fields[0].type = p->types[0];
489  v->fields[1].value = data & 0xFF;
490  if (v->fields[1].value & 0x80) {
491  v->fields[1].value = 0xFFFFFF00 | v->fields[1].value;
492  }
493  v->fields[1].type = p->types[1];
494  } break;
495  case E_IA16U: {
496  v->n = 2;
497  v->fields[1].value = (data & 0x3E00000) >> 10;
498  v->fields[1].type = p->types[0];
499  v->fields[0].value = (data & 0x1F0000) >> 16;
500  v->fields[0].type = p->types[1];
501  v->fields[1].value |= (data & 0x7FF);
502  } break;
503  case E_IA16:
504  case E_I16A: {
505  v->n = 2;
506  v->fields[1].value = (data & 0x3E00000) >> 10;
507  v->fields[1].type = p->types[0];
508  v->fields[0].value = (data & 0x1F0000) >> 16;
509  v->fields[0].type = p->types[1];
510  v->fields[1].value |= (data & 0x7FF);
511  if (v->fields[1].value & 0x8000) {
512  v->fields[1].value = 0xFFFF0000 | v->fields[1].value;
513  }
514  } break;
515  case E_SCI8:
516  case E_SCI8CR: {
517  v->n = 3;
518  v->fields[0].value = (data & 0x3E00000) >> 21;
519  v->fields[0].type = p->types[0];
520  if (p->type == E_SCI8CR) {
521  v->fields[0].value &= 0x3;
522  }
523  v->fields[1].value = (data & 0x1F0000) >> 16;
524  v->fields[1].type = p->types[1];
525  ut32 ui8 = data & 0xFF;
526  ut32 scl = (data & 0x300) >> 8;
527  ut32 f = data & 0x400;
528  switch (scl) {
529  case 0:
530  v->fields[2].value = ui8 | (f ? 0xffffff00 : 0);
531  break;
532  case 1:
533  v->fields[2].value = (ui8 << 8) | (f ? 0xffff00ff : 0);
534  break;
535  case 2:
536  v->fields[2].value = (ui8 << 16) | (f ? 0xff00ffff : 0);
537  break;
538  default:
539  v->fields[2].value = (ui8 << 24) | (f ? 0x00ffffff : 0);
540  break;
541  }
542  v->fields[2].type = p->types[2];
543  } break;
544  case E_SCI8I: {
545  v->n = 3;
546  v->fields[1].value = (data & 0x3E00000) >> 21;
547  v->fields[1].type = p->types[0];
548  v->fields[0].value = (data & 0x1F0000) >> 16;
549  v->fields[0].type = p->types[1];
550  ut32 ui8 = data & 0xFF;
551  ut32 scl = (data & 0x300) >> 8;
552  ut32 f = data & 0x400;
553  switch (scl) {
554  case 0:
555  v->fields[2].value = ui8 | (f ? 0xffffff00 : 0);
556  break;
557  case 1:
558  v->fields[2].value = (ui8 << 8) | (f ? 0xffff00ff : 0);
559  break;
560  case 2:
561  v->fields[2].value = (ui8 << 16) | (f ? 0xff00ffff : 0);
562  break;
563  default:
564  v->fields[2].value = (ui8 << 24) | (f ? 0x00ffffff : 0);
565  break;
566  }
567  v->fields[2].type = p->types[2];
568  } break;
569  case E_I16L: {
570  v->n = 2;
571  v->fields[0].value = (data & 0x3E00000) >> 21;
572  v->fields[0].type = p->types[0];
573  v->fields[1].value = (data & 0x1F0000) >> 5;
574  v->fields[1].value |= (data & 0x7FF);
575  v->fields[1].type = p->types[1];
576  } break;
577  case E_I16LS: {
578  v->n = 2;
579  v->fields[0].value = (data & 0x3E00000) >> 21;
580  v->fields[0].type = p->types[0];
581  v->fields[1].value = (data & 0x1F0000) >> 5;
582  v->fields[1].value |= (data & 0x7FF);
583  v->fields[1].type = p->types[1];
584  } break;
585  case E_BD24: {
586  v->n = 1;
587  v->fields[0].value = data & 0x3FFFFFE;
588  if (v->fields[0].value & 0x1000000) {
589  v->fields[0].value |= 0xFE000000;
590  }
591  v->fields[0].type = p->types[0];
592  } break;
593  case E_BD15: {
594  v->n = 2;
595  v->fields[0].value = (data & 0xC0000) >> 18;
596  v->fields[0].type = p->types[0];
597  v->fields[1].value = data & 0xFFFE;
598  if (v->fields[1].value & 0x8000) {
599  v->fields[1].value |= 0xFFFF0000;
600  }
601  v->fields[1].type = p->types[1];
602  } break;
603  case E_BD15b: {
604  v->n = 3;
605  v->fields[0].value = (data & 0x300000) >> 20;
606  v->fields[0].type = p->types[0];
607  v->fields[1].value = (data & 0xF0000) >> 16;
608  v->fields[1].type = p->types[0];
609  v->fields[2].value = data & 0xFFFE;
610  if (v->fields[2].value & 0x8000) {
611  v->fields[2].value |= 0xFFFF0000;
612  }
613  v->fields[2].type = p->types[2];
614  } break;
615  case E_BD15c: {
616  v->n = 1;
617  v->fields[0].value = data & 0xFFFE;
618  if (v->fields[0].value & 0x8000) {
619  v->fields[0].value |= 0xFFFF0000;
620  }
621  v->fields[0].type = p->types[0];
622  } break;
623  case E_LI20: {
624  v->n = 2;
625  v->fields[0].value = (data & 0x03E00000) >> 21;
626  v->fields[0].type = p->types[0];
627  v->fields[1].value = ((data & 0x001F0000) >> 5);
628  v->fields[1].value |= ((data & 0x7800) << 5);
629  v->fields[1].value |= (data & 0x7FF);
630  v->fields[1].type = p->types[1];
631  if (v->fields[1].value & 0x80000) {
632  v->fields[1].value = 0xFFF00000 | v->fields[1].value;
633  }
634  } break;
635  case E_M: {
636  v->n = 5;
637  v->fields[1].value = (data & 0x3E00000) >> 21;
638  v->fields[1].type = p->types[1];
639  v->fields[0].value = (data & 0x1F0000) >> 16;
640  v->fields[0].type = p->types[0];
641  v->fields[2].value = (data & 0xF800) >> 11;
642  v->fields[2].type = p->types[2];
643  v->fields[3].value = (data & 0x7C0) >> 6;
644  v->fields[3].type = p->types[3];
645  v->fields[4].value = (data & 0x3E) >> 1;
646  v->fields[4].type = p->types[4];
647  } break;
648  case E_XCR: {
649  v->n = 3;
650  v->fields[0].value = (data & 0x3000000) >> 24;
651  v->fields[0].type = p->types[0];
652  v->fields[1].value = (data & 0x1F0000) >> 16;
653  v->fields[1].type = p->types[1];
654  v->fields[2].value = (data & 0xF800) >> 11;
655  v->fields[2].type = p->types[2];
656  } break;
657  case E_XLSP: {
658  v->n = 3;
659  v->fields[0].value = (data & 0x3800000) >> 23;
660  v->fields[0].type = p->types[0];
661  v->fields[1].value = (data & 0x1C0000) >> 18;
662  v->fields[1].type = p->types[1];
663  } break;
664  case E_NONE:
665  default:
666  v->n = 0;
667  break;
668  }
669 }
670 
671 static void set_ppc_fields(vle_t *v, const ppc_t *p, ut32 data) {
672  if (!v) {
673  return;
674  }
675  switch (p->type) {
676  case F_X:
677  case F_XO:
678  case F_EVX: {
679  v->n = 0;
680  if (p->types[0] != TYPE_NONE) {
681  v->fields[0].value = (data & 0x3E00000) >> 21;
682  v->fields[0].type = p->types[0];
683  v->n++;
684  }
685  if (p->types[1] != TYPE_NONE) {
686  v->fields[1].value = (data & 0x1F0000) >> 16;
687  v->fields[1].type = p->types[1];
688  v->n++;
689  }
690  if (p->types[2] != TYPE_NONE) {
691  v->fields[2].value = (data & 0xF800) >> 11;
692  v->fields[2].type = p->types[2];
693  v->n++;
694  }
695  } break;
696  case F_X_EI: {
697  v->n = 1;
698  v->fields[0].value = (data & 0x8000) >> 15;
699  v->fields[0].type = p->types[0];
700  } break;
701  case F_XRA: {
702  v->n = 3;
703  v->fields[1].value = (data & 0x3E00000) >> 21;
704  v->fields[1].type = p->types[0];
705  v->fields[0].value = (data & 0x1F0000) >> 16;
706  v->fields[0].type = p->types[1];
707  v->fields[2].value = (data & 0xF800) >> 11;
708  v->fields[2].type = p->types[2];
709  } break;
710  case F_CMP: {
711  v->n = 3;
712  v->fields[0].value = (data & 0x3800000) >> 23;
713  v->fields[0].type = p->types[0];
714  v->fields[1].value = (data & 0x1F0000) >> 16;
715  v->fields[1].type = p->types[1];
716  v->fields[2].value = (data & 0xF800) >> 11;
717  v->fields[2].type = p->types[2];
718  } break;
719  case F_DCBF: {
720  v->n = 3;
721  v->fields[0].value = (data & 0x0E00000) >> 21;
722  v->fields[0].type = p->types[0];
723  v->fields[1].value = (data & 0x1F0000) >> 16;
724  v->fields[1].type = p->types[1];
725  v->fields[2].value = (data & 0xF800) >> 11;
726  v->fields[2].type = p->types[2];
727  } break;
728  case F_DCBL: {
729  v->n = 3;
730  v->fields[0].value = (data & 0x1E00000) >> 21;
731  v->fields[0].type = p->types[0];
732  v->fields[1].value = (data & 0x1F0000) >> 16;
733  v->fields[1].type = p->types[1];
734  v->fields[2].value = (data & 0xF800) >> 11;
735  v->fields[2].type = p->types[2];
736  } break;
737  case F_DCI: {
738  v->n = 1;
739  v->fields[0].value = (data & 0xE00000) >> 21;
740  v->fields[0].type = p->types[0];
741  } break;
742  case F_EXT: {
743  v->n = 2;
744  v->fields[0].value = (data & 0x3E00000) >> 21;
745  v->fields[0].type = p->types[0];
746  v->fields[1].value = (data & 0x1F0000) >> 16;
747  v->fields[1].type = p->types[1];
748  } break;
749  case F_A: {
750  v->n = 4;
751  v->fields[0].value = (data & 0x1E00000) >> 21;
752  v->fields[0].type = p->types[0];
753  v->fields[1].value = (data & 0x1F0000) >> 16;
754  v->fields[1].type = p->types[1];
755  v->fields[2].value = (data & 0xF800) >> 11;
756  v->fields[2].type = p->types[2];
757  v->fields[3].value = (data & 0x7C0) >> 6;
758  v->fields[3].type = p->types[3];
759  } break;
760  case F_XFX: {
761  v->n = 1;
762  v->fields[0].value = (data & 0x3E00000) >> 21;
763  v->fields[0].type = p->types[0];
764  } break;
765  case F_XER: {
766  v->n = 1;
767  v->fields[0].value = (data & 0x3800000) >> 23;
768  v->fields[0].type = p->types[0];
769  } break;
770  case F_MFPR: {
771  v->n = 2;
772  v->fields[0].value = (data & 0x1E00000) >> 21;
773  v->fields[0].type = p->types[0];
774  v->fields[1].value = (data & 0x1FF800) >> 11;
775  v->fields[1].type = p->types[1];
776  break;
777  }
778  case F_MTPR: {
779  v->n = 2;
780  // inverted
781  v->fields[1].value = (data & 0x1E00000) >> 21;
782  v->fields[1].type = p->types[1];
783  v->fields[0].value = (data & 0x1FF800) >> 11;
784  v->fields[0].type = p->types[0];
785  } break;
786  case E_NONE:
787  default:
788  v->n = 0;
789  break;
790  }
791 }
792 
793 static vle_t *find_ppc(const ut8 *buffer) {
794  ut32 i;
795  ut32 data = (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
796  const ppc_t *p = NULL;
797  const ut32 size = sizeof(ppc_ops) / sizeof(ppc_t);
798  for (i = 0; i < size; i++) {
799  p = &ppc_ops[i];
800  if ((p->op & data) == p->op && (p->mask & data) == data) {
801  vle_t *ret = RZ_NEW0(vle_t);
802  ret->name = p->name;
803  ret->size = 4;
804  ret->n = 0;
805  ret->analysis_op = p->analysis_op;
806  set_ppc_fields(ret, p, data);
807  return ret;
808  }
809  }
810  return NULL;
811 }
812 
813 static vle_t *find_e(const ut8 *buffer) {
814  ut32 i;
815  ut32 data = (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
816  const e_vle_t *p = NULL;
817  const ut32 size = sizeof(e_ops) / sizeof(e_vle_t);
818  for (i = 0; i < size; i++) {
819  p = &e_ops[i];
820  if ((p->op & data) == p->op && (p->mask & data) == data) {
821  vle_t *ret = RZ_NEW0(vle_t);
822  ret->name = p->name;
823  ret->size = 4;
824  ret->n = 0;
825  ret->analysis_op = p->analysis_op;
826  set_e_fields(ret, p, data);
827  return ret;
828  }
829  }
830  return NULL;
831 }
832 
833 static vle_t *find_se(const ut8 *buffer) {
834  ut32 i, j, k;
835  ut16 data = (buffer[0] << 8) | buffer[1];
836  const se_vle_t *p = NULL;
837  const ut32 size = sizeof(se_ops) / sizeof(se_vle_t);
838  for (i = 0; i < size; i++) {
839  p = &se_ops[i];
840  if ((p->op & data) == p->op && (p->mask & data) == data) {
841  vle_t *ret = RZ_NEW0(vle_t);
842  ret->name = p->name;
843  ret->size = 2;
844  ret->analysis_op = p->analysis_op;
845  for (j = 0; j < p->n; j++) {
846  for (k = 0; k < p->n; k++) {
847  if (p->fields[k].idx == j) {
848  ret->fields[j].value = data & p->fields[k].mask;
849  ret->fields[j].value >>= p->fields[k].shr;
850  ret->fields[j].value <<= p->fields[k].shl;
851  ret->fields[j].value += p->fields[k].add;
852  ret->fields[j].value &= 0xFFFF;
853  if (p->fields[k].type == TYPE_REG && ret->fields[j].value & 0x8) {
854  ret->fields[j].value = (ret->fields[j].value & 0x7) + 24;
855  } else if (p->fields[k].type == TYPE_JMP && ret->fields[j].value & 0x0100) {
856  ret->fields[j].value = 0xFFFFFE00 | ret->fields[j].value;
857  }
858  ret->fields[j].type = p->fields[k].type;
859  break;
860  }
861  }
862  }
863  ret->n = p->n;
864  return ret;
865  }
866  }
867  return NULL;
868 }
869 
870 int vle_init(vle_handle *handle, const ut8 *buffer, const ut32 size) {
871  if (!handle || !buffer || size < 2) {
872  return 1;
873  }
874  handle->pos = buffer;
875  handle->end = buffer + size;
876  handle->inc = 0;
877  handle->options = VLE_DEFAULTS;
878  return 0;
879 }
880 
882  if (!handle) {
883  return 1;
884  }
885  handle->options |= option;
886  return 0;
887 }
888 
890  vle_t *op = NULL;
891  if (!handle || handle->pos + handle->inc >= handle->end) {
892  return NULL;
893  }
894  handle->pos += handle->inc;
895  // 'e-32' always before 'se-16'
896 
897  if (USE_INTERNAL_PPC(handle) && handle->pos + 4 <= handle->end) {
898  op = find_ppc(handle->pos);
899  }
900  if (!op && handle->pos + 4 <= handle->end) {
901  op = find_e(handle->pos);
902  }
903  if (!op && handle->pos + 2 <= handle->end) {
904  op = find_se(handle->pos);
905  }
906 
907  handle->inc = op ? op->size : 0;
908  return op;
909 }
910 
911 void vle_free(vle_t *instr) {
912  free(instr);
913 }
914 
915 void vle_snprint(char *str, int size, ut32 addr, vle_t *instr) {
916  ut32 i;
917  int bufsize = size, add = 0;
918  add = snprintf(str, bufsize, "%s", instr->name);
919  for (i = 0; add > 0 && i < instr->n && add < bufsize; i++) {
920  if (instr->fields[i].type == TYPE_REG) {
921  if (i < instr->n - 1 && instr->fields[i + 1].type == TYPE_MEM) {
922  add += snprintf(str + add, bufsize - add, " 0x%x(r%d)", instr->fields[i + 1].value, instr->fields[i].value);
923  i++;
924  } else {
925  add += snprintf(str + add, bufsize - add, " r%u", instr->fields[i].value);
926  }
927  } else if (instr->fields[i].type == TYPE_IMM) {
928  add += snprintf(str + add, bufsize - add, " 0x%x", instr->fields[i].value);
929  } else if (instr->fields[i].type == TYPE_JMP) {
930  add += snprintf(str + add, bufsize - add, " 0x%" PFMT32x, addr + instr->fields[i].value);
931  } else if (instr->fields[i].type == TYPE_CR) {
932  add += snprintf(str + add, bufsize - add, " cr%u", instr->fields[i].value);
933  }
934  }
935 }
ut8 op
Definition: 6502dis.c:13
#define PFMT32x
lzma_index ** i
Definition: index.h:629
@ TYPE_IMM
Definition: armass.c:35
@ TYPE_MEM
Definition: armass.c:36
static mcore_handle handle
Definition: asm_mcore.c:8
struct buffer buffer
#define NULL
Definition: cris-opc.c:27
uint16_t ut16
uint32_t ut32
const char * k
Definition: dsignal.c:11
const char * v
Definition: dsignal.c:12
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
voidpf void uLong size
Definition: ioapi.h:138
snprintf
Definition: kernel.h:364
uint8_t ut8
Definition: lh5801.h:11
void * p
Definition: libc.cpp:67
#define TYPE_CR
@ TYPE_NONE
Definition: marshal.h:30
#define TYPE_REG
Definition: mcore.h:22
#define TYPE_JMP
Definition: mcore.h:25
int n
Definition: mipsasm.c:19
@ RZ_ANALYSIS_OP_TYPE_CMP
Definition: rz_analysis.h:399
@ RZ_ANALYSIS_OP_TYPE_SUB
Definition: rz_analysis.h:402
@ RZ_ANALYSIS_OP_TYPE_LOAD
Definition: rz_analysis.h:416
@ RZ_ANALYSIS_OP_TYPE_MUL
Definition: rz_analysis.h:404
@ RZ_ANALYSIS_OP_TYPE_JMP
Definition: rz_analysis.h:368
@ RZ_ANALYSIS_OP_TYPE_AND
Definition: rz_analysis.h:411
@ RZ_ANALYSIS_OP_TYPE_SYNC
Definition: rz_analysis.h:431
@ RZ_ANALYSIS_OP_TYPE_NOR
Definition: rz_analysis.h:413
@ RZ_ANALYSIS_OP_TYPE_IO
Definition: rz_analysis.h:403
@ RZ_ANALYSIS_OP_TYPE_ROR
Definition: rz_analysis.h:419
@ RZ_ANALYSIS_OP_TYPE_SWI
Definition: rz_analysis.h:393
@ RZ_ANALYSIS_OP_TYPE_CMOV
Definition: rz_analysis.h:391
@ RZ_ANALYSIS_OP_TYPE_TRAP
Definition: rz_analysis.h:392
@ RZ_ANALYSIS_OP_TYPE_CCALL
Definition: rz_analysis.h:383
@ RZ_ANALYSIS_OP_TYPE_CALL
Definition: rz_analysis.h:378
@ RZ_ANALYSIS_OP_TYPE_ADD
Definition: rz_analysis.h:401
@ RZ_ANALYSIS_OP_TYPE_OR
Definition: rz_analysis.h:410
@ RZ_ANALYSIS_OP_TYPE_STORE
Definition: rz_analysis.h:415
@ RZ_ANALYSIS_OP_TYPE_CPL
Definition: rz_analysis.h:429
@ RZ_ANALYSIS_OP_TYPE_SHR
Definition: rz_analysis.h:406
@ RZ_ANALYSIS_OP_TYPE_RJMP
Definition: rz_analysis.h:370
@ RZ_ANALYSIS_OP_TYPE_CJMP
Definition: rz_analysis.h:373
@ RZ_ANALYSIS_OP_TYPE_DIV
Definition: rz_analysis.h:405
@ RZ_ANALYSIS_OP_TYPE_MOV
Definition: rz_analysis.h:390
@ RZ_ANALYSIS_OP_TYPE_SHL
Definition: rz_analysis.h:407
@ RZ_ANALYSIS_OP_TYPE_ILL
Definition: rz_analysis.h:387
@ RZ_ANALYSIS_OP_TYPE_NOT
Definition: rz_analysis.h:414
@ RZ_ANALYSIS_OP_TYPE_RET
Definition: rz_analysis.h:385
@ RZ_ANALYSIS_OP_TYPE_RCALL
Definition: rz_analysis.h:380
@ RZ_ANALYSIS_OP_TYPE_XOR
Definition: rz_analysis.h:412
@ RZ_TYPE_COND_VS
Overflow Unordered.
Definition: rz_type.h:195
@ RZ_TYPE_COND_LE
Less or equal.
Definition: rz_type.h:188
@ RZ_TYPE_COND_GE
Greater or equal.
Definition: rz_type.h:186
@ RZ_TYPE_COND_VC
No overflow Not unordered.
Definition: rz_type.h:196
@ RZ_TYPE_COND_NV
Never executed must be a nop? :D.
Definition: rz_type.h:190
@ RZ_TYPE_COND_EQ
Equal.
Definition: rz_type.h:184
@ RZ_TYPE_COND_NE
Not equal.
Definition: rz_type.h:185
@ RZ_TYPE_COND_AL
Always executed (no condition)
Definition: rz_type.h:183
@ RZ_TYPE_COND_GT
Greater than.
Definition: rz_type.h:187
@ RZ_TYPE_COND_LT
Less than.
Definition: rz_type.h:189
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define f(i)
Definition: sha256.c:46
Definition: buffer.h:15
const ut8 * pos
Definition: mcore.h:31
ut16 inc
Definition: mcore.h:32
const ut8 * end
Definition: mcore.h:30
Definition: getopt.h:84
ut16 type
Definition: vle.h:27
ut32 value
Definition: vle.h:26
Definition: vle.h:18
Definition: vle.h:30
const char * name
Definition: vle.h:31
vle_field_t fields[10]
Definition: vle.h:32
ut16 size
Definition: vle.h:34
ut16 n
Definition: vle.h:33
ut32 analysis_op
Definition: vle.h:35
Definition: dis.c:32
#define E_MASK_M
Definition: vle.c:44
#define E_X
Definition: vle.c:27
const e_vle_t e_ops[]
Definition: vle.c:240
#define F_MASK_EXT
Definition: vle.c:70
#define F_XO
Definition: vle.c:48
#define F_CMP
Definition: vle.c:50
#define E_I16A
Definition: vle.c:17
#define E_IA16U
Definition: vle.c:21
#define E_D8_N
Definition: vle.c:16
static void set_ppc_fields(vle_t *v, const ppc_t *p, ut32 data)
Definition: vle.c:671
static void set_e_fields(vle_t *v, const e_vle_t *p, ut32 data)
Definition: vle.c:429
#define E_BD24
Definition: vle.c:13
#define E_IA16
Definition: vle.c:20
#define E_XCR
Definition: vle.c:28
#define E_MASK_LI20
Definition: vle.c:43
#define F_X_EI
Definition: vle.c:60
const ppc_t ppc_ops[]
Definition: vle.c:77
#define E_MASK_D
Definition: vle.c:35
#define E_LI20
Definition: vle.c:22
#define E_MASK_BD15
Definition: vle.c:41
#define F_NONE
Definition: vle.c:46
#define F_MASK_MTPR
Definition: vle.c:75
static vle_t * find_se(const ut8 *buffer)
Definition: vle.c:833
#define E_MASK_X
Definition: vle.c:33
#define F_MASK_CMP
Definition: vle.c:66
#define F_XRA
Definition: vle.c:61
#define F_MASK_EVX
Definition: vle.c:65
#define F_DCI
Definition: vle.c:53
vle_t * vle_next(vle_handle *handle)
Definition: vle.c:889
#define E_BD15c
Definition: vle.c:12
#define E_NONE
Definition: vle.c:9
#define F_A
Definition: vle.c:55
#define F_MASK_DCI
Definition: vle.c:69
#define F_XFX
Definition: vle.c:56
#define E_MASK_I16L
Definition: vle.c:39
#define E_BD15
Definition: vle.c:10
int vle_init(vle_handle *handle, const ut8 *buffer, const ut32 size)
Definition: vle.c:870
#define E_MASK_IA16
Definition: vle.c:42
#define E_BD15b
Definition: vle.c:11
#define E_XL
Definition: vle.c:29
#define E_D
Definition: vle.c:14
#define F_MASK_A
Definition: vle.c:71
#define E_M
Definition: vle.c:23
#define E_SCI8I
Definition: vle.c:26
#define E_XRA
Definition: vle.c:31
static vle_t * find_e(const ut8 *buffer)
Definition: vle.c:813
const se_vle_t se_ops[]
Definition: vle.c:354
#define F_EVX
Definition: vle.c:49
#define F_EXT
Definition: vle.c:54
#define F_MASK_MFPR
Definition: vle.c:74
#define F_MASK_XO
Definition: vle.c:64
#define F_MASK_XER
Definition: vle.c:73
int vle_option(vle_handle *handle, ut32 option)
Definition: vle.c:881
#define F_DCBL
Definition: vle.c:52
#define F_MASK_DCBL
Definition: vle.c:68
static vle_t * find_ppc(const ut8 *buffer)
Definition: vle.c:793
void vle_snprint(char *str, int size, ut32 addr, vle_t *instr)
Definition: vle.c:915
#define F_MASK_DCBF
Definition: vle.c:67
#define E_MASK_D8
Definition: vle.c:36
#define E_MASK_XL
Definition: vle.c:34
#define E_SCI8
Definition: vle.c:24
#define E_XLSP
Definition: vle.c:30
#define F_MASK_X
Definition: vle.c:63
#define F_MFPR
Definition: vle.c:58
#define E_MASK_I16A
Definition: vle.c:37
#define F_X
Definition: vle.c:47
#define E_I16LS
Definition: vle.c:19
#define E_SCI8CR
Definition: vle.c:25
#define E_I16L
Definition: vle.c:18
void vle_free(vle_t *instr)
Definition: vle.c:911
#define E_MASK_SCI8
Definition: vle.c:38
#define E_D8
Definition: vle.c:15
#define F_XER
Definition: vle.c:57
#define F_MTPR
Definition: vle.c:59
#define F_MASK_XFX
Definition: vle.c:72
#define F_DCBF
Definition: vle.c:51
#define USE_INTERNAL_PPC(x)
Definition: vle.c:7
#define E_MASK_BD24
Definition: vle.c:40
#define VLE_DEFAULTS
Definition: vle.h:8
static int option
Definition: vmenus.c:2426
static int addr
Definition: z80asm.c:58
static int add(char *argv[])
Definition: ziptool.c:84