Debian Codegraph @

arch/M680X/M680XInstPrinter.c

raw symbols SCIP
1 /* Capstone Disassembly Engine */cxx . . $ `<file>/arch/M680X/M680XInstPrinter.c`/
2 /* M680X Backend by Wolfgang Schwotzer <[email protected]> 2017 */
3
4 #ifdef CAPSTONE_HAS_M680Xcxx . . $ `<built-in>:423:9`!
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <string.h>
8 #include <capstone/platform.h>cxx . . $ `<file>/include/capstone/platform.h`/
9
10 #include "../../cs_priv.h"cxx . . $ `<file>/cs_priv.h`/
11 #include "../../MCInst.h"cxx . . $ `<file>/MCInst.h`/
12 #include "../../SStream.h"cxx . . $ `<file>/SStream.h`/
13 #include "../../MCRegisterInfo.h"cxx . . $ `<file>/MCRegisterInfo.h`/
14 #include "../../utils.h"cxx . . $ `<file>/utils.h`/
15 #include "M680XInstPrinter.h"cxx . . $ `<file>/arch/M680X/M680XInstPrinter.h`/
16 #include "M680XDisassembler.h"cxx . . $ `<file>/arch/M680X/M680XDisassembler.h`/
17 #include "M680XDisassemblerInternals.h"cxx . . $ `<file>/arch/M680X/M680XDisassemblerInternals.h`/
18
19 #ifndef CAPSTONE_DIET
20 static const char s_reg_namescxx . . $ s_reg_names.[][10] = {
21 "<invalid>", "a", "b", "e", "f", "0", "d", "w", "cc", "dp", "md",
22 "hx", "h", "x", "y", "s", "u", "v", "q", "pc", "tmp2", "tmp3",
23 };
24
25 static const char s_instruction_namescxx . . $ s_instruction_names.[][6] = {
26 "invld", "aba", "abx", "aby", "adc", "adca", "adcb", "adcd", "adcr",
27 "add", "adda", "addb", "addd", "adde", "addf", "addr", "addw",
28 "aim", "ais", "aix", "and", "anda", "andb", "andcc", "andd", "andr",
29 "asl", "asla", "aslb", "asld",
30 "asr", "asra", "asrb", "asrd", "asrx",
31 "band",
32 "bcc", "bclr", "bcs", "beor", "beq", "bge", "bgnd", "bgt", "bhcc",
33 "bhcs", "bhi",
34 "biand", "bieor", "bih", "bil",
35 "bior", "bit", "bita", "bitb", "bitd", "bitmd", "ble", "bls", "blt",
36 "bmc",
37 "bmi", "bms",
38 "bne", "bor", "bpl", "brclr", "brset", "bra", "brn", "bset", "bsr",
39 "bvc", "bvs",
40 "call", "cba", "cbeq", "cbeqa", "cbeqx", "clc", "cli",
41 "clr", "clra", "clrb", "clrd", "clre", "clrf", "clrh", "clrw", "clrx",
42 "clv", "cmp",
43 "cmpa", "cmpb", "cmpd", "cmpe", "cmpf", "cmpr", "cmps", "cmpu", "cmpw",
44 "cmpx", "cmpy",
45 "com", "coma", "comb", "comd", "come", "comf", "comw", "comx", "cpd",
46 "cphx", "cps", "cpx", "cpy",
47 "cwai", "daa", "dbeq", "dbne", "dbnz", "dbnza", "dbnzx",
48 "dec", "deca", "decb", "decd", "dece", "decf", "decw",
49 "decx", "des", "dex", "dey",
50 "div", "divd", "divq", "ediv", "edivs", "eim", "emacs", "emaxd",
51 "emaxm", "emind", "eminm", "emul", "emuls",
52 "eor", "eora", "eorb", "eord", "eorr", "etbl",
53 "exg", "fdiv", "ibeq", "ibne", "idiv", "idivs", "illgl",
54 "inc", "inca", "incb", "incd", "ince", "incf", "incw", "incx",
55 "ins", "inx", "iny",
56 "jmp", "jsr",
57 "lbcc", "lbcs", "lbeq", "lbge", "lbgt", "lbhi", "lble", "lbls", "lblt",
58 "lbmi", "lbne", "lbpl", "lbra", "lbrn", "lbsr", "lbvc", "lbvs",
59 "lda", "ldaa", "ldab", "ldb", "ldbt", "ldd", "lde", "ldf", "ldhx",
60 "ldmd",
61 "ldq", "lds", "ldu", "ldw", "ldx", "ldy",
62 "leas", "leau", "leax", "leay",
63 "lsl", "lsla", "lslb", "lsld", "lslx",
64 "lsr", "lsra", "lsrb", "lsrd", "lsrw", "lsrx",
65 "maxa", "maxm", "mem", "mina", "minm", "mov", "movb", "movw", "mul",
66 "muld",
67 "neg", "nega", "negb", "negd", "negx",
68 "nop", "nsa", "oim", "ora", "oraa", "orab", "orb", "orcc", "ord", "orr",
69 "psha", "pshb", "pshc", "pshd", "pshh", "pshs", "pshsw", "pshu",
70 "pshuw", "pshx", "pshy",
71 "pula", "pulb", "pulc", "puld", "pulh", "puls", "pulsw", "pulu",
72 "puluw", "pulx", "puly", "rev", "revw",
73 "rol", "rola", "rolb", "rold", "rolw", "rolx",
74 "ror", "rora", "rorb", "rord", "rorw", "rorx",
75 "rsp", "rtc", "rti", "rts", "sba", "sbc", "sbca", "sbcb", "sbcd",
76 "sbcr",
77 "sec", "sei", "sev", "sex", "sexw", "slp", "sta", "staa", "stab", "stb",
78 "stbt", "std", "ste", "stf", "stop", "sthx",
79 "stq", "sts", "stu", "stw", "stx", "sty",
80 "sub", "suba", "subb", "subd", "sube", "subf", "subr", "subw",
81 "swi", "swi2", "swi3",
82 "sync", "tab", "tap", "tax", "tba", "tbeq", "tbl", "tbne", "test",
83 "tfm", "tfr",
84 "tim", "tpa",
85 "tst", "tsta", "tstb", "tstd", "tste", "tstf", "tstw", "tstx",
86 "tsx", "tsy", "txa", "txs", "tys", "wai", "wait", "wav", "wavr",
87 "xgdx", "xgdy",
88 };
89
90 static const name_mapcxx . . $ name_map# s_group_namescxx . . $ s_group_names.[] = {
91 { M680X_GRP_INVALIDcxx . . $ M680X_GRP_INVALID., "<invalid>" },
92 { M680X_GRP_JUMPcxx . . $ M680X_GRP_JUMP., "jump" },
93 { M680X_GRP_CALLcxx . . $ M680X_GRP_CALL., "call" },
94 { M680X_GRP_RETcxx . . $ M680X_GRP_RET., "return" },
95 { M680X_GRP_INTcxx . . $ M680X_GRP_INT., "interrupt" },
96 { M680X_GRP_IRETcxx . . $ M680X_GRP_IRET., "interrupt_return" },
97 { M680X_GRP_PRIVcxx . . $ M680X_GRP_PRIV., "privileged" },
98 { M680X_GRP_BRARELcxx . . $ M680X_GRP_BRAREL., "branch_relative" },
99 };
100 #endif
101
102 static void printRegNamecxx . . $ printRegName(27b486e9c79b0615).(cs_structcxx . . $ cs_struct# *handle, SStreamcxx . . $ SStream# *OS, unsigned int reg)
103 {
104 #ifndef CAPSTONE_DIET
105 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(OS, handle->reg_namecxx . . $ cs_struct#reg_name.((cshcxx . . $ csh#)handle, reg));
106 #endif
107 }
108
109 static void printInstructionNamecxx . . $ printInstructionName(27b486e9c79b0615).(cs_structcxx . . $ cs_struct# *handle, SStreamcxx . . $ SStream# *OS,
110 unsigned int insn)
111 {
112 #ifndef CAPSTONE_DIET
113 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(OS, handle->insn_namecxx . . $ cs_struct#insn_name.((cshcxx . . $ csh#)handle, insn));
114 #endif
115 }
116
117 static uint32_tcxx . . $ uint32_t# get_unsignedcxx . . $ get_unsigned(58c590d1186ea715).(int32_tcxx . . $ int32_t# value, int byte_size)
118 {
119 switch (byte_size) {
120 case 1:
121 return (uint32_tcxx . . $ uint32_t#)(value & 0xff);
122
123 case 2:
124 return (uint32_tcxx . . $ uint32_t#)(value & 0xffff);
125
126 default:
127 case 4:
128 return (uint32_tcxx . . $ uint32_t#)value;
129 }
130 }
131
132 static void printIncDeccxx . . $ printIncDec(5362e0735b46e83b).(boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! isPost, SStreamcxx . . $ SStream# *O, m680x_infocxx . . $ m680x_info# *info,
133 cs_m680x_opcxx . . $ cs_m680x_op# *op)
134 {
135 static const char s_inc_dec[][3] = { "--", "-", "", "+", "++" };
136
137 if (!op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec.)
138 return;
139
140 if ((!isPost && !(op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..flagscxx . . $ m680x_op_idx#flags. & M680X_IDX_POST_INC_DECcxx . . $ `include/capstone/m680x.h:78:9`!)) ||
141 (isPost && (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..flagscxx . . $ m680x_op_idx#flags. & M680X_IDX_POST_INC_DECcxx . . $ `include/capstone/m680x.h:78:9`!))) {
142 const char *prePostfix = "";
143
144 if (info->cpu_typecxx . . $ m680x_info#cpu_type. == M680X_CPU_TYPE_CPU12cxx . . $ M680X_CPU_TYPE_CPU12.)
145 prePostfix = (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec. < 0) ? "-" : "+";
146 else if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec. >= -2 && (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec. <= 2)) {
147 prePostfix = (char *)s_inc_dec[op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec. + 2];
148 }
149
150 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, prePostfix);
151 }
152 }
153
154 static void printOperandcxx . . $ printOperand(7e4819e8fd5bac).(MCInstcxx . . $ MCInst# *MI, SStreamcxx . . $ SStream# *O, m680x_infocxx . . $ m680x_info# *info,
155 cs_m680x_opcxx . . $ cs_m680x_op# *op)
156 {
157 switch (op->typecxx . . $ cs_m680x_op#type.) {
158 case M680X_OP_REGISTERcxx . . $ M680X_OP_REGISTER.:
159 printRegNamecxx . . $ printRegName(27b486e9c79b0615).(MI->cshcxx . . $ MCInst#csh., O, op->regcxx . . $ cs_m680x_op#$anonymous_type_0#reg.);
160 break;
161
162 case M680X_OP_CONSTANTcxx . . $ M680X_OP_CONSTANT.:
163 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%u", op->const_valcxx . . $ cs_m680x_op#$anonymous_type_0#const_val.);
164 break;
165
166 case M680X_OP_IMMEDIATEcxx . . $ M680X_OP_IMMEDIATE.:
167 if (MI->cshcxx . . $ MCInst#csh.->imm_unsignedcxx . . $ cs_struct#imm_unsigned.)
168 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "#%u",
169 get_unsignedcxx . . $ get_unsigned(58c590d1186ea715).(op->immcxx . . $ cs_m680x_op#$anonymous_type_0#imm., op->sizecxx . . $ cs_m680x_op#size.));
170 else
171 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "#%d", op->immcxx . . $ cs_m680x_op#$anonymous_type_0#imm.);
172
173 break;
174
175 case M680X_OP_INDEXEDcxx . . $ M680X_OP_INDEXED.:
176 if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..flagscxx . . $ m680x_op_idx#flags. & M680X_IDX_INDIRECTcxx . . $ `include/capstone/m680x.h:76:9`!)
177 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, "[");
178
179 if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..offset_regcxx . . $ m680x_op_idx#offset_reg. != M680X_REG_INVALIDcxx . . $ M680X_REG_INVALID.)
180 printRegNamecxx . . $ printRegName(27b486e9c79b0615).(MI->cshcxx . . $ MCInst#csh., O, op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..offset_regcxx . . $ m680x_op_idx#offset_reg.);
181 else if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..offset_bitscxx . . $ m680x_op_idx#offset_bits. > 0) {
182 if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..base_regcxx . . $ m680x_op_idx#base_reg. == M680X_REG_PCcxx . . $ M680X_REG_PC.)
183 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "$%04x", op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..offset_addrcxx . . $ m680x_op_idx#offset_addr.);
184 else
185 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%d", op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..offsetcxx . . $ m680x_op_idx#offset.);
186 }
187 else if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec. != 0 &&
188 info->cpu_typecxx . . $ m680x_info#cpu_type. == M680X_CPU_TYPE_CPU12cxx . . $ M680X_CPU_TYPE_CPU12.)
189 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "%d", abscxx . . $ abs(7864480464b09eea).(op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..inc_deccxx . . $ m680x_op_idx#inc_dec.));
190
191 if (!(op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..flagscxx . . $ m680x_op_idx#flags. & M680X_IDX_NO_COMMAcxx . . $ `include/capstone/m680x.h:77:9`!))
192 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, ", ");
193
194 printIncDeccxx . . $ printIncDec(5362e0735b46e83b).(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!, O, info, op);
195
196 printRegNamecxx . . $ printRegName(27b486e9c79b0615).(MI->cshcxx . . $ MCInst#csh., O, op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..base_regcxx . . $ m680x_op_idx#base_reg.);
197
198 if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..base_regcxx . . $ m680x_op_idx#base_reg. == M680X_REG_PCcxx . . $ M680X_REG_PC. &&
199 (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..offset_bitscxx . . $ m680x_op_idx#offset_bits. > 0))
200 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "r");
201
202 printIncDeccxx . . $ printIncDec(5362e0735b46e83b).(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!, O, info, op);
203
204 if (op->idxcxx . . $ cs_m680x_op#$anonymous_type_0#idx..flagscxx . . $ m680x_op_idx#flags. & M680X_IDX_INDIRECTcxx . . $ `include/capstone/m680x.h:76:9`!)
205 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "]");
206
207 break;
208
209 case M680X_OP_RELATIVEcxx . . $ M680X_OP_RELATIVE.:
210 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "$%04x", op->relcxx . . $ cs_m680x_op#$anonymous_type_0#rel..addresscxx . . $ m680x_op_rel#address.);
211 break;
212
213 case M680X_OP_DIRECTcxx . . $ M680X_OP_DIRECT.:
214 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "$%02x", op->direct_addrcxx . . $ cs_m680x_op#$anonymous_type_0#direct_addr.);
215 break;
216
217 case M680X_OP_EXTENDEDcxx . . $ M680X_OP_EXTENDED.:
218 if (op->extcxx . . $ cs_m680x_op#$anonymous_type_0#ext..indirectcxx . . $ m680x_op_ext#indirect.)
219 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "[$%04x]", op->extcxx . . $ cs_m680x_op#$anonymous_type_0#ext..addresscxx . . $ m680x_op_ext#address.);
220 else {
221 if (op->extcxx . . $ cs_m680x_op#$anonymous_type_0#ext..addresscxx . . $ m680x_op_ext#address. < 256) {
222 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, ">$%04x", op->extcxx . . $ cs_m680x_op#$anonymous_type_0#ext..addresscxx . . $ m680x_op_ext#address.);
223 }
224 else {
225 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "$%04x", op->extcxx . . $ cs_m680x_op#$anonymous_type_0#ext..addresscxx . . $ m680x_op_ext#address.);
226 }
227 }
228
229 break;
230
231 default:
232 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, "<invalid_operand>");
233 break;
234 }
235 }
236
237 static const char *getDelimitercxx . . $ getDelimiter(7a4f1232b4c0c054).(m680x_infocxx . . $ m680x_info# *info, cs_m680xcxx . . $ cs_m680x# *m680x)
238 {
239 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! indexed = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
240 int count = 0;
241 int i;
242
243 if (info->insncxx . . $ m680x_info#insn. == M680X_INS_TFMcxx . . $ M680X_INS_TFM.)
244 return ", ";
245
246 if (m680x->op_countcxx . . $ cs_m680x#op_count. > 1) {
247 for (i = 0; i < m680x->op_countcxx . . $ cs_m680x#op_count.; ++i) {
248 if (m680x->operandscxx . . $ cs_m680x#operands.[i].typecxx . . $ cs_m680x_op#type. == M680X_OP_INDEXEDcxx . . $ M680X_OP_INDEXED.)
249 indexed = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
250
251 if (m680x->operandscxx . . $ cs_m680x#operands.[i].typecxx . . $ cs_m680x_op#type. != M680X_OP_REGISTERcxx . . $ M680X_OP_REGISTER.)
252 count++;
253 }
254 }
255
256 return (indexed && (count >= 1)) ? "; " : ", ";
257 };
258
259 void M680X_printInstcxx . . $ M680X_printInst(6238f66e5ea10f57).(MCInstcxx . . $ MCInst# *MI, SStreamcxx . . $ SStream# *O, void *PrinterInfo)
260 {
261 m680x_infocxx . . $ m680x_info# *info = (m680x_infocxx . . $ m680x_info# *)PrinterInfo;
262 cs_m680xcxx . . $ cs_m680x# *m680x = &info->m680xcxx . . $ m680x_info#m680x.;
263 cs_detailcxx . . $ cs_detail# *detail = MI->flat_insncxx . . $ MCInst#flat_insn.->detailcxx . . $ cs_insn#detail.;
264 int suppress_operands = 0;
265 const char *delimiter = getDelimitercxx . . $ getDelimiter(7a4f1232b4c0c054).(info, m680x);
266 int i;
267
268 if (detail != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!)
269 memcpycxx . . $ memcpy(cc817cb175f282d).(&detail->m680xcxx . . $ cs_detail#$anonymous_type_0#m680x., m680x, sizeof(cs_m680xcxx . . $ cs_m680x#));
270
271 if (info->insncxx . . $ m680x_info#insn. == M680X_INS_INVLDcxx . . $ M680X_INS_INVLD. || info->insncxx . . $ m680x_info#insn. == M680X_INS_ILLGLcxx . . $ M680X_INS_ILLGL.) {
272 if (m680x->op_countcxx . . $ cs_m680x#op_count.)
273 SStream_concatcxx . . $ SStream_concat(72515e07697b04b4).(O, "fcb $%02x", m680x->operandscxx . . $ cs_m680x#operands.[0].immcxx . . $ cs_m680x_op#$anonymous_type_0#imm.);
274 else
275 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, "fcb $<unknown>");
276
277 return;
278 }
279
280 printInstructionNamecxx . . $ printInstructionName(27b486e9c79b0615).(MI->cshcxx . . $ MCInst#csh., O, info->insncxx . . $ m680x_info#insn.);
281 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, " ");
282
283 if ((m680x->flagscxx . . $ cs_m680x#flags. & M680X_FIRST_OP_IN_MNEMcxx . . $ `include/capstone/m680x.h:159:9`!) != 0)
284 suppress_operands++;
285
286 if ((m680x->flagscxx . . $ cs_m680x#flags. & M680X_SECOND_OP_IN_MNEMcxx . . $ `include/capstone/m680x.h:162:9`!) != 0)
287 suppress_operands++;
288
289 for (i = 0; i < m680x->op_countcxx . . $ cs_m680x#op_count.; ++i) {
290 if (i >= suppress_operands) {
291 printOperandcxx . . $ printOperand(7e4819e8fd5bac).(MI, O, info, &m680x->operandscxx . . $ cs_m680x#operands.[i]);
292
293 if ((i + 1) != m680x->op_countcxx . . $ cs_m680x#op_count.)
294 SStream_concat0cxx . . $ SStream_concat0(a720692b9b1c0c27).(O, delimiter);
295 }
296 }
297 }
298
299 const char *M680X_reg_namecxx . . $ M680X_reg_name(efd1348d9ae5172e).(cshcxx . . $ csh# handle, unsigned int reg)
300 {
301 #ifndef CAPSTONE_DIET
302
303 if (reg >= ARR_SIZEcxx . . $ `utils.h:24:9`!(s_reg_names))
304 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
305
306 return s_reg_namescxx . . $ s_reg_names.[(int)reg];
307 #else
308 return NULL;
309 #endif
310 }
311
312 const char *M680X_insn_namecxx . . $ M680X_insn_name(efd1348d9ae5172e).(cshcxx . . $ csh# handle, unsigned int id)
313 {
314 #ifndef CAPSTONE_DIET
315
316 if (id >= ARR_SIZEcxx . . $ `utils.h:24:9`!(s_instruction_names))
317 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
318 else
319 return s_instruction_namescxx . . $ s_instruction_names.[(int)id];
320
321 #else
322 return NULL;
323 #endif
324 }
325
326 const char *M680X_group_namecxx . . $ M680X_group_name(efd1348d9ae5172e).(cshcxx . . $ csh# handle, unsigned int id)
327 {
328 #ifndef CAPSTONE_DIET
329 return id2namecxx . . $ id2name(92d4aec78e87b576).(s_group_namescxx . . $ s_group_names., ARR_SIZEcxx . . $ `utils.h:24:9`!(s_group_names), id);
330 #else
331 return NULL;
332 #endif
333 }
334
335 cs_errcxx . . $ cs_err# M680X_instprinter_initcxx . . $ M680X_instprinter_init(2c23641276a36c6e).(cs_structcxx . . $ cs_struct# *ud)
336 {
337 #ifndef CAPSTONE_DIET
338
339 if (M680X_REG_ENDINGcxx . . $ M680X_REG_ENDING. != ARR_SIZEcxx . . $ `utils.h:24:9`!(s_reg_names)) {
340 CS_ASSERTcxx . . $ `cs_priv.h:103:9`!(M680X_REG_ENDING == ARR_SIZE(s_reg_names));
341 return CS_ERR_MODEcxx . . $ CS_ERR_MODE.;
342 }
343
344 if (M680X_INS_ENDINGcxx . . $ M680X_INS_ENDING. != ARR_SIZEcxx . . $ `utils.h:24:9`!(s_instruction_names)) {
345 CS_ASSERTcxx . . $ `cs_priv.h:103:9`!(M680X_INS_ENDING == ARR_SIZE(s_instruction_names));
346 return CS_ERR_MODEcxx . . $ CS_ERR_MODE.;
347 }
348
349 if (M680X_GRP_ENDINGcxx . . $ M680X_GRP_ENDING. != ARR_SIZEcxx . . $ `utils.h:24:9`!(s_group_names)) {
350 CS_ASSERTcxx . . $ `cs_priv.h:103:9`!(M680X_GRP_ENDING == ARR_SIZE(s_group_names));
351 return CS_ERR_MODEcxx . . $ CS_ERR_MODE.;
352 }
353
354 #endif
355
356 return CS_ERR_OKcxx . . $ CS_ERR_OK.;
357 }
358
359 #endif
360