1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* Assembly Writer Source Fragment *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* From: BPF.td *| |
7 | |* *| |
8 | \*===----------------------------------------------------------------------===*/ |
9 | |
10 | /// getMnemonic - This method is automatically generated by tablegen |
11 | /// from the instruction set description. |
12 | std::pair<const char *, uint64_t> BPFInstPrinter::getMnemonic(const MCInst *MI) { |
13 | |
14 | #ifdef __GNUC__ |
15 | #pragma GCC diagnostic push |
16 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
17 | #endif |
18 | static const char AsmStrs[] = { |
19 | /* 0 */ "lea\t\0" |
20 | /* 5 */ "ld_pseudo\t\0" |
21 | /* 16 */ "nop\t\0" |
22 | /* 21 */ "#memcpy dst: \0" |
23 | /* 35 */ "#ADJCALLSTACKDOWN \0" |
24 | /* 54 */ "# Select PSEUDO \0" |
25 | /* 71 */ "#ADJCALLSTACKUP \0" |
26 | /* 88 */ "if \0" |
27 | /* 92 */ "call \0" |
28 | /* 98 */ "gotol \0" |
29 | /* 105 */ "may_goto \0" |
30 | /* 115 */ "callx \0" |
31 | /* 122 */ "lock *(u32 *)(\0" |
32 | /* 137 */ "lock *(u64 *)(\0" |
33 | /* 152 */ "*(u16 *)(\0" |
34 | /* 162 */ "*(u8 *)(\0" |
35 | /* 171 */ "w0 = cmpxchg32_32(\0" |
36 | /* 190 */ "r0 = cmpxchg_64(\0" |
37 | /* 207 */ "core_st(\0" |
38 | /* 216 */ "# XRay Function Patchable RET.\0" |
39 | /* 247 */ "# XRay Typed Event Log.\0" |
40 | /* 271 */ "# XRay Custom Event Log.\0" |
41 | /* 296 */ "# XRay Function Enter.\0" |
42 | /* 319 */ "# XRay Tail Call Exit.\0" |
43 | /* 342 */ "# XRay Function Exit.\0" |
44 | /* 364 */ "LIFETIME_END\0" |
45 | /* 377 */ "PSEUDO_PROBE\0" |
46 | /* 390 */ "BUNDLE\0" |
47 | /* 397 */ "DBG_VALUE\0" |
48 | /* 407 */ "DBG_INSTR_REF\0" |
49 | /* 421 */ "DBG_PHI\0" |
50 | /* 429 */ "DBG_LABEL\0" |
51 | /* 439 */ "LIFETIME_START\0" |
52 | /* 454 */ "DBG_VALUE_LIST\0" |
53 | /* 469 */ "r0 = *(u32 *)skb[\0" |
54 | /* 487 */ "r0 = *(u16 *)skb[\0" |
55 | /* 505 */ "r0 = *(u8 *)skb[\0" |
56 | /* 522 */ "# FEntry call\0" |
57 | /* 536 */ "exit\0" |
58 | }; |
59 | #ifdef __GNUC__ |
60 | #pragma GCC diagnostic pop |
61 | #endif |
62 | |
63 | static const uint32_t OpInfo0[] = { |
64 | 0U, // PHI |
65 | 0U, // INLINEASM |
66 | 0U, // INLINEASM_BR |
67 | 0U, // CFI_INSTRUCTION |
68 | 0U, // EH_LABEL |
69 | 0U, // GC_LABEL |
70 | 0U, // ANNOTATION_LABEL |
71 | 0U, // KILL |
72 | 0U, // EXTRACT_SUBREG |
73 | 0U, // INSERT_SUBREG |
74 | 0U, // IMPLICIT_DEF |
75 | 0U, // SUBREG_TO_REG |
76 | 0U, // COPY_TO_REGCLASS |
77 | 398U, // DBG_VALUE |
78 | 455U, // DBG_VALUE_LIST |
79 | 408U, // DBG_INSTR_REF |
80 | 422U, // DBG_PHI |
81 | 430U, // DBG_LABEL |
82 | 0U, // REG_SEQUENCE |
83 | 0U, // COPY |
84 | 391U, // BUNDLE |
85 | 440U, // LIFETIME_START |
86 | 365U, // LIFETIME_END |
87 | 378U, // PSEUDO_PROBE |
88 | 0U, // ARITH_FENCE |
89 | 0U, // STACKMAP |
90 | 523U, // FENTRY_CALL |
91 | 0U, // PATCHPOINT |
92 | 0U, // LOAD_STACK_GUARD |
93 | 0U, // PREALLOCATED_SETUP |
94 | 0U, // PREALLOCATED_ARG |
95 | 0U, // STATEPOINT |
96 | 0U, // LOCAL_ESCAPE |
97 | 0U, // FAULTING_OP |
98 | 0U, // PATCHABLE_OP |
99 | 297U, // PATCHABLE_FUNCTION_ENTER |
100 | 217U, // PATCHABLE_RET |
101 | 343U, // PATCHABLE_FUNCTION_EXIT |
102 | 320U, // PATCHABLE_TAIL_CALL |
103 | 272U, // PATCHABLE_EVENT_CALL |
104 | 248U, // PATCHABLE_TYPED_EVENT_CALL |
105 | 0U, // ICALL_BRANCH_FUNNEL |
106 | 0U, // MEMBARRIER |
107 | 0U, // JUMP_TABLE_DEBUG_INFO |
108 | 0U, // CONVERGENCECTRL_ENTRY |
109 | 0U, // CONVERGENCECTRL_ANCHOR |
110 | 0U, // CONVERGENCECTRL_LOOP |
111 | 0U, // CONVERGENCECTRL_GLUE |
112 | 0U, // G_ASSERT_SEXT |
113 | 0U, // G_ASSERT_ZEXT |
114 | 0U, // G_ASSERT_ALIGN |
115 | 0U, // G_ADD |
116 | 0U, // G_SUB |
117 | 0U, // G_MUL |
118 | 0U, // G_SDIV |
119 | 0U, // G_UDIV |
120 | 0U, // G_SREM |
121 | 0U, // G_UREM |
122 | 0U, // G_SDIVREM |
123 | 0U, // G_UDIVREM |
124 | 0U, // G_AND |
125 | 0U, // G_OR |
126 | 0U, // G_XOR |
127 | 0U, // G_IMPLICIT_DEF |
128 | 0U, // G_PHI |
129 | 0U, // G_FRAME_INDEX |
130 | 0U, // G_GLOBAL_VALUE |
131 | 0U, // G_PTRAUTH_GLOBAL_VALUE |
132 | 0U, // G_CONSTANT_POOL |
133 | 0U, // G_EXTRACT |
134 | 0U, // G_UNMERGE_VALUES |
135 | 0U, // G_INSERT |
136 | 0U, // G_MERGE_VALUES |
137 | 0U, // G_BUILD_VECTOR |
138 | 0U, // G_BUILD_VECTOR_TRUNC |
139 | 0U, // G_CONCAT_VECTORS |
140 | 0U, // G_PTRTOINT |
141 | 0U, // G_INTTOPTR |
142 | 0U, // G_BITCAST |
143 | 0U, // G_FREEZE |
144 | 0U, // G_CONSTANT_FOLD_BARRIER |
145 | 0U, // G_INTRINSIC_FPTRUNC_ROUND |
146 | 0U, // G_INTRINSIC_TRUNC |
147 | 0U, // G_INTRINSIC_ROUND |
148 | 0U, // G_INTRINSIC_LRINT |
149 | 0U, // G_INTRINSIC_LLRINT |
150 | 0U, // G_INTRINSIC_ROUNDEVEN |
151 | 0U, // G_READCYCLECOUNTER |
152 | 0U, // G_READSTEADYCOUNTER |
153 | 0U, // G_LOAD |
154 | 0U, // G_SEXTLOAD |
155 | 0U, // G_ZEXTLOAD |
156 | 0U, // G_INDEXED_LOAD |
157 | 0U, // G_INDEXED_SEXTLOAD |
158 | 0U, // G_INDEXED_ZEXTLOAD |
159 | 0U, // G_STORE |
160 | 0U, // G_INDEXED_STORE |
161 | 0U, // G_ATOMIC_CMPXCHG_WITH_SUCCESS |
162 | 0U, // G_ATOMIC_CMPXCHG |
163 | 0U, // G_ATOMICRMW_XCHG |
164 | 0U, // G_ATOMICRMW_ADD |
165 | 0U, // G_ATOMICRMW_SUB |
166 | 0U, // G_ATOMICRMW_AND |
167 | 0U, // G_ATOMICRMW_NAND |
168 | 0U, // G_ATOMICRMW_OR |
169 | 0U, // G_ATOMICRMW_XOR |
170 | 0U, // G_ATOMICRMW_MAX |
171 | 0U, // G_ATOMICRMW_MIN |
172 | 0U, // G_ATOMICRMW_UMAX |
173 | 0U, // G_ATOMICRMW_UMIN |
174 | 0U, // G_ATOMICRMW_FADD |
175 | 0U, // G_ATOMICRMW_FSUB |
176 | 0U, // G_ATOMICRMW_FMAX |
177 | 0U, // G_ATOMICRMW_FMIN |
178 | 0U, // G_ATOMICRMW_UINC_WRAP |
179 | 0U, // G_ATOMICRMW_UDEC_WRAP |
180 | 0U, // G_FENCE |
181 | 0U, // G_PREFETCH |
182 | 0U, // G_BRCOND |
183 | 0U, // G_BRINDIRECT |
184 | 0U, // G_INVOKE_REGION_START |
185 | 0U, // G_INTRINSIC |
186 | 0U, // G_INTRINSIC_W_SIDE_EFFECTS |
187 | 0U, // G_INTRINSIC_CONVERGENT |
188 | 0U, // G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS |
189 | 0U, // G_ANYEXT |
190 | 0U, // G_TRUNC |
191 | 0U, // G_CONSTANT |
192 | 0U, // G_FCONSTANT |
193 | 0U, // G_VASTART |
194 | 0U, // G_VAARG |
195 | 0U, // G_SEXT |
196 | 0U, // G_SEXT_INREG |
197 | 0U, // G_ZEXT |
198 | 0U, // G_SHL |
199 | 0U, // G_LSHR |
200 | 0U, // G_ASHR |
201 | 0U, // G_FSHL |
202 | 0U, // G_FSHR |
203 | 0U, // G_ROTR |
204 | 0U, // G_ROTL |
205 | 0U, // G_ICMP |
206 | 0U, // G_FCMP |
207 | 0U, // G_SCMP |
208 | 0U, // G_UCMP |
209 | 0U, // G_SELECT |
210 | 0U, // G_UADDO |
211 | 0U, // G_UADDE |
212 | 0U, // G_USUBO |
213 | 0U, // G_USUBE |
214 | 0U, // G_SADDO |
215 | 0U, // G_SADDE |
216 | 0U, // G_SSUBO |
217 | 0U, // G_SSUBE |
218 | 0U, // G_UMULO |
219 | 0U, // G_SMULO |
220 | 0U, // G_UMULH |
221 | 0U, // G_SMULH |
222 | 0U, // G_UADDSAT |
223 | 0U, // G_SADDSAT |
224 | 0U, // G_USUBSAT |
225 | 0U, // G_SSUBSAT |
226 | 0U, // G_USHLSAT |
227 | 0U, // G_SSHLSAT |
228 | 0U, // G_SMULFIX |
229 | 0U, // G_UMULFIX |
230 | 0U, // G_SMULFIXSAT |
231 | 0U, // G_UMULFIXSAT |
232 | 0U, // G_SDIVFIX |
233 | 0U, // G_UDIVFIX |
234 | 0U, // G_SDIVFIXSAT |
235 | 0U, // G_UDIVFIXSAT |
236 | 0U, // G_FADD |
237 | 0U, // G_FSUB |
238 | 0U, // G_FMUL |
239 | 0U, // G_FMA |
240 | 0U, // G_FMAD |
241 | 0U, // G_FDIV |
242 | 0U, // G_FREM |
243 | 0U, // G_FPOW |
244 | 0U, // G_FPOWI |
245 | 0U, // G_FEXP |
246 | 0U, // G_FEXP2 |
247 | 0U, // G_FEXP10 |
248 | 0U, // G_FLOG |
249 | 0U, // G_FLOG2 |
250 | 0U, // G_FLOG10 |
251 | 0U, // G_FLDEXP |
252 | 0U, // G_FFREXP |
253 | 0U, // G_FNEG |
254 | 0U, // G_FPEXT |
255 | 0U, // G_FPTRUNC |
256 | 0U, // G_FPTOSI |
257 | 0U, // G_FPTOUI |
258 | 0U, // G_SITOFP |
259 | 0U, // G_UITOFP |
260 | 0U, // G_FABS |
261 | 0U, // G_FCOPYSIGN |
262 | 0U, // G_IS_FPCLASS |
263 | 0U, // G_FCANONICALIZE |
264 | 0U, // G_FMINNUM |
265 | 0U, // G_FMAXNUM |
266 | 0U, // G_FMINNUM_IEEE |
267 | 0U, // G_FMAXNUM_IEEE |
268 | 0U, // G_FMINIMUM |
269 | 0U, // G_FMAXIMUM |
270 | 0U, // G_GET_FPENV |
271 | 0U, // G_SET_FPENV |
272 | 0U, // G_RESET_FPENV |
273 | 0U, // G_GET_FPMODE |
274 | 0U, // G_SET_FPMODE |
275 | 0U, // G_RESET_FPMODE |
276 | 0U, // G_PTR_ADD |
277 | 0U, // G_PTRMASK |
278 | 0U, // G_SMIN |
279 | 0U, // G_SMAX |
280 | 0U, // G_UMIN |
281 | 0U, // G_UMAX |
282 | 0U, // G_ABS |
283 | 0U, // G_LROUND |
284 | 0U, // G_LLROUND |
285 | 0U, // G_BR |
286 | 0U, // G_BRJT |
287 | 0U, // G_VSCALE |
288 | 0U, // G_INSERT_SUBVECTOR |
289 | 0U, // G_EXTRACT_SUBVECTOR |
290 | 0U, // G_INSERT_VECTOR_ELT |
291 | 0U, // G_EXTRACT_VECTOR_ELT |
292 | 0U, // G_SHUFFLE_VECTOR |
293 | 0U, // G_SPLAT_VECTOR |
294 | 0U, // G_VECTOR_COMPRESS |
295 | 0U, // G_CTTZ |
296 | 0U, // G_CTTZ_ZERO_UNDEF |
297 | 0U, // G_CTLZ |
298 | 0U, // G_CTLZ_ZERO_UNDEF |
299 | 0U, // G_CTPOP |
300 | 0U, // G_BSWAP |
301 | 0U, // G_BITREVERSE |
302 | 0U, // G_FCEIL |
303 | 0U, // G_FCOS |
304 | 0U, // G_FSIN |
305 | 0U, // G_FTAN |
306 | 0U, // G_FACOS |
307 | 0U, // G_FASIN |
308 | 0U, // G_FATAN |
309 | 0U, // G_FCOSH |
310 | 0U, // G_FSINH |
311 | 0U, // G_FTANH |
312 | 0U, // G_FSQRT |
313 | 0U, // G_FFLOOR |
314 | 0U, // G_FRINT |
315 | 0U, // G_FNEARBYINT |
316 | 0U, // G_ADDRSPACE_CAST |
317 | 0U, // G_BLOCK_ADDR |
318 | 0U, // G_JUMP_TABLE |
319 | 0U, // G_DYN_STACKALLOC |
320 | 0U, // G_STACKSAVE |
321 | 0U, // G_STACKRESTORE |
322 | 0U, // G_STRICT_FADD |
323 | 0U, // G_STRICT_FSUB |
324 | 0U, // G_STRICT_FMUL |
325 | 0U, // G_STRICT_FDIV |
326 | 0U, // G_STRICT_FREM |
327 | 0U, // G_STRICT_FMA |
328 | 0U, // G_STRICT_FSQRT |
329 | 0U, // G_STRICT_FLDEXP |
330 | 0U, // G_READ_REGISTER |
331 | 0U, // G_WRITE_REGISTER |
332 | 0U, // G_MEMCPY |
333 | 0U, // G_MEMCPY_INLINE |
334 | 0U, // G_MEMMOVE |
335 | 0U, // G_MEMSET |
336 | 0U, // G_BZERO |
337 | 0U, // G_TRAP |
338 | 0U, // G_DEBUGTRAP |
339 | 0U, // G_UBSANTRAP |
340 | 0U, // G_VECREDUCE_SEQ_FADD |
341 | 0U, // G_VECREDUCE_SEQ_FMUL |
342 | 0U, // G_VECREDUCE_FADD |
343 | 0U, // G_VECREDUCE_FMUL |
344 | 0U, // G_VECREDUCE_FMAX |
345 | 0U, // G_VECREDUCE_FMIN |
346 | 0U, // G_VECREDUCE_FMAXIMUM |
347 | 0U, // G_VECREDUCE_FMINIMUM |
348 | 0U, // G_VECREDUCE_ADD |
349 | 0U, // G_VECREDUCE_MUL |
350 | 0U, // G_VECREDUCE_AND |
351 | 0U, // G_VECREDUCE_OR |
352 | 0U, // G_VECREDUCE_XOR |
353 | 0U, // G_VECREDUCE_SMAX |
354 | 0U, // G_VECREDUCE_SMIN |
355 | 0U, // G_VECREDUCE_UMAX |
356 | 0U, // G_VECREDUCE_UMIN |
357 | 0U, // G_SBFX |
358 | 0U, // G_UBFX |
359 | 1060U, // ADJCALLSTACKDOWN |
360 | 1096U, // ADJCALLSTACKUP |
361 | 9217U, // FI_ri |
362 | 17430U, // MEMCPY |
363 | 1074231U, // Select |
364 | 1074231U, // Select_32 |
365 | 1074231U, // Select_32_64 |
366 | 1074231U, // Select_64_32 |
367 | 1074231U, // Select_Ri |
368 | 1074231U, // Select_Ri_32 |
369 | 1074231U, // Select_Ri_32_64 |
370 | 1074231U, // Select_Ri_64_32 |
371 | 33797U, // ADDR_SPACE_CAST |
372 | 41989U, // ADD_ri |
373 | 41989U, // ADD_ri_32 |
374 | 41989U, // ADD_rr |
375 | 41989U, // ADD_rr_32 |
376 | 50181U, // AND_ri |
377 | 50181U, // AND_ri_32 |
378 | 50181U, // AND_rr |
379 | 50181U, // AND_rr_32 |
380 | 58373U, // BE16 |
381 | 66565U, // BE32 |
382 | 74757U, // BE64 |
383 | 82949U, // BSWAP16 |
384 | 91141U, // BSWAP32 |
385 | 99333U, // BSWAP64 |
386 | 108735U, // CMPXCHGD |
387 | 116908U, // CMPXCHGW32 |
388 | 123909U, // CORE_LD32 |
389 | 132101U, // CORE_LD64 |
390 | 140293U, // CORE_SHIFT |
391 | 6300880U, // CORE_ST |
392 | 148485U, // DIV_ri |
393 | 148485U, // DIV_ri_32 |
394 | 148485U, // DIV_rr |
395 | 148485U, // DIV_rr_32 |
396 | 156765U, // JAL |
397 | 156788U, // JALX |
398 | 3178U, // JCOND |
399 | 164953U, // JEQ_ri |
400 | 164953U, // JEQ_ri_32 |
401 | 164953U, // JEQ_rr |
402 | 164953U, // JEQ_rr_32 |
403 | 3182U, // JMP |
404 | 3171U, // JMPL |
405 | 173145U, // JNE_ri |
406 | 173145U, // JNE_ri_32 |
407 | 173145U, // JNE_rr |
408 | 173145U, // JNE_rr_32 |
409 | 181337U, // JSET_ri |
410 | 181337U, // JSET_ri_32 |
411 | 181337U, // JSET_rr |
412 | 181337U, // JSET_rr_32 |
413 | 189529U, // JSGE_ri |
414 | 189529U, // JSGE_ri_32 |
415 | 189529U, // JSGE_rr |
416 | 189529U, // JSGE_rr_32 |
417 | 197721U, // JSGT_ri |
418 | 197721U, // JSGT_ri_32 |
419 | 197721U, // JSGT_rr |
420 | 197721U, // JSGT_rr_32 |
421 | 205913U, // JSLE_ri |
422 | 205913U, // JSLE_ri_32 |
423 | 205913U, // JSLE_rr |
424 | 205913U, // JSLE_rr_32 |
425 | 214105U, // JSLT_ri |
426 | 214105U, // JSLT_ri_32 |
427 | 214105U, // JSLT_rr |
428 | 214105U, // JSLT_rr_32 |
429 | 222297U, // JUGE_ri |
430 | 222297U, // JUGE_ri_32 |
431 | 222297U, // JUGE_rr |
432 | 222297U, // JUGE_rr_32 |
433 | 230489U, // JUGT_ri |
434 | 230489U, // JUGT_ri_32 |
435 | 230489U, // JUGT_rr |
436 | 230489U, // JUGT_rr_32 |
437 | 238681U, // JULE_ri |
438 | 238681U, // JULE_ri_32 |
439 | 238681U, // JULE_rr |
440 | 238681U, // JULE_rr_32 |
441 | 246873U, // JULT_ri |
442 | 246873U, // JULT_ri_32 |
443 | 246873U, // JULT_rr |
444 | 246873U, // JULT_rr_32 |
445 | 254981U, // LDB |
446 | 254981U, // LDB32 |
447 | 263173U, // LDBSX |
448 | 271365U, // LDD |
449 | 279557U, // LDH |
450 | 279557U, // LDH32 |
451 | 287749U, // LDHSX |
452 | 295941U, // LDW |
453 | 295941U, // LDW32 |
454 | 304133U, // LDWSX |
455 | 4602U, // LD_ABS_B |
456 | 4584U, // LD_ABS_H |
457 | 4566U, // LD_ABS_W |
458 | 4602U, // LD_IND_B |
459 | 4584U, // LD_IND_H |
460 | 4566U, // LD_IND_W |
461 | 10511365U, // LD_imm64 |
462 | 22029318U, // LD_pseudo |
463 | 312325U, // LE16 |
464 | 320517U, // LE32 |
465 | 328709U, // LE64 |
466 | 336901U, // MOD_ri |
467 | 336901U, // MOD_ri_32 |
468 | 336901U, // MOD_rr |
469 | 336901U, // MOD_rr_32 |
470 | 345093U, // MOVSX_rr_16 |
471 | 353285U, // MOVSX_rr_32 |
472 | 345093U, // MOVSX_rr_32_16 |
473 | 361477U, // MOVSX_rr_32_8 |
474 | 361477U, // MOVSX_rr_8 |
475 | 13657093U, // MOV_32_64 |
476 | 13657093U, // MOV_ri |
477 | 13657093U, // MOV_ri_32 |
478 | 13657093U, // MOV_rr |
479 | 13657093U, // MOV_rr_32 |
480 | 369669U, // MUL_ri |
481 | 369669U, // MUL_ri_32 |
482 | 369669U, // MUL_rr |
483 | 369669U, // MUL_rr_32 |
484 | 377861U, // NEG_32 |
485 | 377861U, // NEG_64 |
486 | 156689U, // NOP |
487 | 386053U, // OR_ri |
488 | 386053U, // OR_ri_32 |
489 | 386053U, // OR_rr |
490 | 386053U, // OR_rr_32 |
491 | 537U, // RET |
492 | 394245U, // SDIV_ri |
493 | 394245U, // SDIV_ri_32 |
494 | 394245U, // SDIV_rr |
495 | 394245U, // SDIV_rr_32 |
496 | 402437U, // SLL_ri |
497 | 402437U, // SLL_ri_32 |
498 | 402437U, // SLL_rr |
499 | 402437U, // SLL_rr_32 |
500 | 410629U, // SMOD_ri |
501 | 410629U, // SMOD_ri_32 |
502 | 410629U, // SMOD_rr |
503 | 410629U, // SMOD_rr_32 |
504 | 418821U, // SRA_ri |
505 | 418821U, // SRA_ri_32 |
506 | 418821U, // SRA_rr |
507 | 418821U, // SRA_rr_32 |
508 | 427013U, // SRL_ri |
509 | 427013U, // SRL_ri_32 |
510 | 427013U, // SRL_rr |
511 | 427013U, // SRL_rr_32 |
512 | 439459U, // STB |
513 | 439459U, // STB32 |
514 | 439459U, // STB_imm |
515 | 439439U, // STD |
516 | 439439U, // STD_imm |
517 | 439449U, // STH |
518 | 439449U, // STH32 |
519 | 439449U, // STH_imm |
520 | 439424U, // STW |
521 | 439424U, // STW32 |
522 | 439424U, // STW_imm |
523 | 443397U, // SUB_ri |
524 | 443397U, // SUB_ri_32 |
525 | 443397U, // SUB_rr |
526 | 443397U, // SUB_rr_32 |
527 | 455818U, // XADDD |
528 | 455803U, // XADDW |
529 | 455803U, // XADDW32 |
530 | 464010U, // XANDD |
531 | 463995U, // XANDW32 |
532 | 467973U, // XCHGD |
533 | 476165U, // XCHGW32 |
534 | 484357U, // XFADDD |
535 | 492549U, // XFADDW32 |
536 | 500741U, // XFANDD |
537 | 508933U, // XFANDW32 |
538 | 517125U, // XFORD |
539 | 525317U, // XFORW32 |
540 | 533509U, // XFXORD |
541 | 541701U, // XFXORW32 |
542 | 554122U, // XORD |
543 | 554107U, // XORW32 |
544 | 558085U, // XOR_ri |
545 | 558085U, // XOR_ri_32 |
546 | 558085U, // XOR_rr |
547 | 558085U, // XOR_rr_32 |
548 | 570506U, // XXORD |
549 | 570491U, // XXORW32 |
550 | }; |
551 | |
552 | // Emit the opcode for the instruction. |
553 | uint32_t Bits = 0; |
554 | Bits |= OpInfo0[MI->getOpcode()] << 0; |
555 | if (Bits == 0) |
556 | return {nullptr, Bits}; |
557 | return {AsmStrs+(Bits & 1023)-1, Bits}; |
558 | |
559 | } |
560 | /// printInstruction - This method is automatically generated by tablegen |
561 | /// from the instruction set description. |
562 | LLVM_NO_PROFILE_INSTRUMENT_FUNCTION |
563 | void BPFInstPrinter::printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O) { |
564 | O << "\t" ; |
565 | |
566 | auto MnemonicInfo = getMnemonic(MI); |
567 | |
568 | O << MnemonicInfo.first; |
569 | |
570 | uint32_t Bits = MnemonicInfo.second; |
571 | assert(Bits != 0 && "Cannot print this instruction." ); |
572 | |
573 | // Fragment 0 encoded into 3 bits for 6 unique commands. |
574 | switch ((Bits >> 10) & 7) { |
575 | default: llvm_unreachable("Invalid command number." ); |
576 | case 0: |
577 | // DBG_VALUE, DBG_VALUE_LIST, DBG_INSTR_REF, DBG_PHI, DBG_LABEL, BUNDLE, ... |
578 | return; |
579 | break; |
580 | case 1: |
581 | // ADJCALLSTACKDOWN, ADJCALLSTACKUP, FI_ri, MEMCPY, Select, Select_32, Se... |
582 | printOperand(MI, OpNo: 0, O); |
583 | break; |
584 | case 2: |
585 | // CMPXCHGD, CMPXCHGW32 |
586 | printMemOperand(MI, OpNo: 0, O); |
587 | break; |
588 | case 3: |
589 | // JCOND, JMP, JMPL |
590 | printBrTargetOperand(MI, OpNo: 0, O); |
591 | return; |
592 | break; |
593 | case 4: |
594 | // LD_ABS_B, LD_ABS_H, LD_ABS_W, LD_IND_B, LD_IND_H, LD_IND_W |
595 | printOperand(MI, OpNo: 1, O); |
596 | O << ']'; |
597 | return; |
598 | break; |
599 | case 5: |
600 | // STB, STB32, STB_imm, STD, STD_imm, STH, STH32, STH_imm, STW, STW32, ST... |
601 | printMemOperand(MI, OpNo: 1, O); |
602 | break; |
603 | } |
604 | |
605 | |
606 | // Fragment 1 encoded into 7 bits for 70 unique commands. |
607 | switch ((Bits >> 13) & 127) { |
608 | default: llvm_unreachable("Invalid command number." ); |
609 | case 0: |
610 | // ADJCALLSTACKDOWN, ADJCALLSTACKUP |
611 | O << ' '; |
612 | printOperand(MI, OpNo: 1, O); |
613 | return; |
614 | break; |
615 | case 1: |
616 | // FI_ri, CORE_ST, LD_pseudo |
617 | O << ", " ; |
618 | break; |
619 | case 2: |
620 | // MEMCPY |
621 | O << ", src: " ; |
622 | printOperand(MI, OpNo: 1, O); |
623 | O << ", len: " ; |
624 | printOperand(MI, OpNo: 2, O); |
625 | O << ", align: " ; |
626 | printOperand(MI, OpNo: 3, O); |
627 | return; |
628 | break; |
629 | case 3: |
630 | // Select, Select_32, Select_32_64, Select_64_32, Select_Ri, Select_Ri_32... |
631 | O << " = " ; |
632 | break; |
633 | case 4: |
634 | // ADDR_SPACE_CAST |
635 | O << " = addr_space_cast(" ; |
636 | printOperand(MI, OpNo: 1, O); |
637 | O << ", " ; |
638 | printOperand(MI, OpNo: 2, O); |
639 | O << ", " ; |
640 | printOperand(MI, OpNo: 3, O); |
641 | O << ')'; |
642 | return; |
643 | break; |
644 | case 5: |
645 | // ADD_ri, ADD_ri_32, ADD_rr, ADD_rr_32 |
646 | O << " += " ; |
647 | printOperand(MI, OpNo: 2, O); |
648 | return; |
649 | break; |
650 | case 6: |
651 | // AND_ri, AND_ri_32, AND_rr, AND_rr_32 |
652 | O << " &= " ; |
653 | printOperand(MI, OpNo: 2, O); |
654 | return; |
655 | break; |
656 | case 7: |
657 | // BE16 |
658 | O << " = be16 " ; |
659 | printOperand(MI, OpNo: 1, O); |
660 | return; |
661 | break; |
662 | case 8: |
663 | // BE32 |
664 | O << " = be32 " ; |
665 | printOperand(MI, OpNo: 1, O); |
666 | return; |
667 | break; |
668 | case 9: |
669 | // BE64 |
670 | O << " = be64 " ; |
671 | printOperand(MI, OpNo: 1, O); |
672 | return; |
673 | break; |
674 | case 10: |
675 | // BSWAP16 |
676 | O << " = bswap16 " ; |
677 | printOperand(MI, OpNo: 1, O); |
678 | return; |
679 | break; |
680 | case 11: |
681 | // BSWAP32 |
682 | O << " = bswap32 " ; |
683 | printOperand(MI, OpNo: 1, O); |
684 | return; |
685 | break; |
686 | case 12: |
687 | // BSWAP64 |
688 | O << " = bswap64 " ; |
689 | printOperand(MI, OpNo: 1, O); |
690 | return; |
691 | break; |
692 | case 13: |
693 | // CMPXCHGD |
694 | O << ", r0, " ; |
695 | printOperand(MI, OpNo: 2, O); |
696 | O << ')'; |
697 | return; |
698 | break; |
699 | case 14: |
700 | // CMPXCHGW32 |
701 | O << ", w0, " ; |
702 | printOperand(MI, OpNo: 2, O); |
703 | O << ')'; |
704 | return; |
705 | break; |
706 | case 15: |
707 | // CORE_LD32 |
708 | O << " = core_ld32(" ; |
709 | printImm64Operand(MI, OpNo: 1, O); |
710 | O << ", " ; |
711 | printOperand(MI, OpNo: 2, O); |
712 | O << ", " ; |
713 | printImm64Operand(MI, OpNo: 3, O); |
714 | O << ')'; |
715 | return; |
716 | break; |
717 | case 16: |
718 | // CORE_LD64 |
719 | O << " = core_ld64(" ; |
720 | printImm64Operand(MI, OpNo: 1, O); |
721 | O << ", " ; |
722 | printOperand(MI, OpNo: 2, O); |
723 | O << ", " ; |
724 | printImm64Operand(MI, OpNo: 3, O); |
725 | O << ')'; |
726 | return; |
727 | break; |
728 | case 17: |
729 | // CORE_SHIFT |
730 | O << " = core_shift(" ; |
731 | printImm64Operand(MI, OpNo: 1, O); |
732 | O << ", " ; |
733 | printOperand(MI, OpNo: 2, O); |
734 | O << ", " ; |
735 | printImm64Operand(MI, OpNo: 3, O); |
736 | O << ')'; |
737 | return; |
738 | break; |
739 | case 18: |
740 | // DIV_ri, DIV_ri_32, DIV_rr, DIV_rr_32 |
741 | O << " /= " ; |
742 | printOperand(MI, OpNo: 2, O); |
743 | return; |
744 | break; |
745 | case 19: |
746 | // JAL, JALX, NOP |
747 | return; |
748 | break; |
749 | case 20: |
750 | // JEQ_ri, JEQ_ri_32, JEQ_rr, JEQ_rr_32 |
751 | O << " == " ; |
752 | printOperand(MI, OpNo: 1, O); |
753 | O << " goto " ; |
754 | printBrTargetOperand(MI, OpNo: 2, O); |
755 | return; |
756 | break; |
757 | case 21: |
758 | // JNE_ri, JNE_ri_32, JNE_rr, JNE_rr_32 |
759 | O << " != " ; |
760 | printOperand(MI, OpNo: 1, O); |
761 | O << " goto " ; |
762 | printBrTargetOperand(MI, OpNo: 2, O); |
763 | return; |
764 | break; |
765 | case 22: |
766 | // JSET_ri, JSET_ri_32, JSET_rr, JSET_rr_32 |
767 | O << " & " ; |
768 | printOperand(MI, OpNo: 1, O); |
769 | O << " goto " ; |
770 | printBrTargetOperand(MI, OpNo: 2, O); |
771 | return; |
772 | break; |
773 | case 23: |
774 | // JSGE_ri, JSGE_ri_32, JSGE_rr, JSGE_rr_32 |
775 | O << " s>= " ; |
776 | printOperand(MI, OpNo: 1, O); |
777 | O << " goto " ; |
778 | printBrTargetOperand(MI, OpNo: 2, O); |
779 | return; |
780 | break; |
781 | case 24: |
782 | // JSGT_ri, JSGT_ri_32, JSGT_rr, JSGT_rr_32 |
783 | O << " s> " ; |
784 | printOperand(MI, OpNo: 1, O); |
785 | O << " goto " ; |
786 | printBrTargetOperand(MI, OpNo: 2, O); |
787 | return; |
788 | break; |
789 | case 25: |
790 | // JSLE_ri, JSLE_ri_32, JSLE_rr, JSLE_rr_32 |
791 | O << " s<= " ; |
792 | printOperand(MI, OpNo: 1, O); |
793 | O << " goto " ; |
794 | printBrTargetOperand(MI, OpNo: 2, O); |
795 | return; |
796 | break; |
797 | case 26: |
798 | // JSLT_ri, JSLT_ri_32, JSLT_rr, JSLT_rr_32 |
799 | O << " s< " ; |
800 | printOperand(MI, OpNo: 1, O); |
801 | O << " goto " ; |
802 | printBrTargetOperand(MI, OpNo: 2, O); |
803 | return; |
804 | break; |
805 | case 27: |
806 | // JUGE_ri, JUGE_ri_32, JUGE_rr, JUGE_rr_32 |
807 | O << " >= " ; |
808 | printOperand(MI, OpNo: 1, O); |
809 | O << " goto " ; |
810 | printBrTargetOperand(MI, OpNo: 2, O); |
811 | return; |
812 | break; |
813 | case 28: |
814 | // JUGT_ri, JUGT_ri_32, JUGT_rr, JUGT_rr_32 |
815 | O << " > " ; |
816 | printOperand(MI, OpNo: 1, O); |
817 | O << " goto " ; |
818 | printBrTargetOperand(MI, OpNo: 2, O); |
819 | return; |
820 | break; |
821 | case 29: |
822 | // JULE_ri, JULE_ri_32, JULE_rr, JULE_rr_32 |
823 | O << " <= " ; |
824 | printOperand(MI, OpNo: 1, O); |
825 | O << " goto " ; |
826 | printBrTargetOperand(MI, OpNo: 2, O); |
827 | return; |
828 | break; |
829 | case 30: |
830 | // JULT_ri, JULT_ri_32, JULT_rr, JULT_rr_32 |
831 | O << " < " ; |
832 | printOperand(MI, OpNo: 1, O); |
833 | O << " goto " ; |
834 | printBrTargetOperand(MI, OpNo: 2, O); |
835 | return; |
836 | break; |
837 | case 31: |
838 | // LDB, LDB32 |
839 | O << " = *(u8 *)(" ; |
840 | printMemOperand(MI, OpNo: 1, O); |
841 | O << ')'; |
842 | return; |
843 | break; |
844 | case 32: |
845 | // LDBSX |
846 | O << " = *(s8 *)(" ; |
847 | printMemOperand(MI, OpNo: 1, O); |
848 | O << ')'; |
849 | return; |
850 | break; |
851 | case 33: |
852 | // LDD |
853 | O << " = *(u64 *)(" ; |
854 | printMemOperand(MI, OpNo: 1, O); |
855 | O << ')'; |
856 | return; |
857 | break; |
858 | case 34: |
859 | // LDH, LDH32 |
860 | O << " = *(u16 *)(" ; |
861 | printMemOperand(MI, OpNo: 1, O); |
862 | O << ')'; |
863 | return; |
864 | break; |
865 | case 35: |
866 | // LDHSX |
867 | O << " = *(s16 *)(" ; |
868 | printMemOperand(MI, OpNo: 1, O); |
869 | O << ')'; |
870 | return; |
871 | break; |
872 | case 36: |
873 | // LDW, LDW32 |
874 | O << " = *(u32 *)(" ; |
875 | printMemOperand(MI, OpNo: 1, O); |
876 | O << ')'; |
877 | return; |
878 | break; |
879 | case 37: |
880 | // LDWSX |
881 | O << " = *(s32 *)(" ; |
882 | printMemOperand(MI, OpNo: 1, O); |
883 | O << ')'; |
884 | return; |
885 | break; |
886 | case 38: |
887 | // LE16 |
888 | O << " = le16 " ; |
889 | printOperand(MI, OpNo: 1, O); |
890 | return; |
891 | break; |
892 | case 39: |
893 | // LE32 |
894 | O << " = le32 " ; |
895 | printOperand(MI, OpNo: 1, O); |
896 | return; |
897 | break; |
898 | case 40: |
899 | // LE64 |
900 | O << " = le64 " ; |
901 | printOperand(MI, OpNo: 1, O); |
902 | return; |
903 | break; |
904 | case 41: |
905 | // MOD_ri, MOD_ri_32, MOD_rr, MOD_rr_32 |
906 | O << " %= " ; |
907 | printOperand(MI, OpNo: 2, O); |
908 | return; |
909 | break; |
910 | case 42: |
911 | // MOVSX_rr_16, MOVSX_rr_32_16 |
912 | O << " = (s16)" ; |
913 | printOperand(MI, OpNo: 1, O); |
914 | return; |
915 | break; |
916 | case 43: |
917 | // MOVSX_rr_32 |
918 | O << " = (s32)" ; |
919 | printOperand(MI, OpNo: 1, O); |
920 | return; |
921 | break; |
922 | case 44: |
923 | // MOVSX_rr_32_8, MOVSX_rr_8 |
924 | O << " = (s8)" ; |
925 | printOperand(MI, OpNo: 1, O); |
926 | return; |
927 | break; |
928 | case 45: |
929 | // MUL_ri, MUL_ri_32, MUL_rr, MUL_rr_32 |
930 | O << " *= " ; |
931 | printOperand(MI, OpNo: 2, O); |
932 | return; |
933 | break; |
934 | case 46: |
935 | // NEG_32, NEG_64 |
936 | O << " = -" ; |
937 | printOperand(MI, OpNo: 1, O); |
938 | return; |
939 | break; |
940 | case 47: |
941 | // OR_ri, OR_ri_32, OR_rr, OR_rr_32 |
942 | O << " |= " ; |
943 | printOperand(MI, OpNo: 2, O); |
944 | return; |
945 | break; |
946 | case 48: |
947 | // SDIV_ri, SDIV_ri_32, SDIV_rr, SDIV_rr_32 |
948 | O << " s/= " ; |
949 | printOperand(MI, OpNo: 2, O); |
950 | return; |
951 | break; |
952 | case 49: |
953 | // SLL_ri, SLL_ri_32, SLL_rr, SLL_rr_32 |
954 | O << " <<= " ; |
955 | printOperand(MI, OpNo: 2, O); |
956 | return; |
957 | break; |
958 | case 50: |
959 | // SMOD_ri, SMOD_ri_32, SMOD_rr, SMOD_rr_32 |
960 | O << " s%= " ; |
961 | printOperand(MI, OpNo: 2, O); |
962 | return; |
963 | break; |
964 | case 51: |
965 | // SRA_ri, SRA_ri_32, SRA_rr, SRA_rr_32 |
966 | O << " s>>= " ; |
967 | printOperand(MI, OpNo: 2, O); |
968 | return; |
969 | break; |
970 | case 52: |
971 | // SRL_ri, SRL_ri_32, SRL_rr, SRL_rr_32 |
972 | O << " >>= " ; |
973 | printOperand(MI, OpNo: 2, O); |
974 | return; |
975 | break; |
976 | case 53: |
977 | // STB, STB32, STB_imm, STD, STD_imm, STH, STH32, STH_imm, STW, STW32, ST... |
978 | O << ") = " ; |
979 | printOperand(MI, OpNo: 0, O); |
980 | return; |
981 | break; |
982 | case 54: |
983 | // SUB_ri, SUB_ri_32, SUB_rr, SUB_rr_32 |
984 | O << " -= " ; |
985 | printOperand(MI, OpNo: 2, O); |
986 | return; |
987 | break; |
988 | case 55: |
989 | // XADDD, XADDW, XADDW32 |
990 | O << ") += " ; |
991 | printOperand(MI, OpNo: 3, O); |
992 | return; |
993 | break; |
994 | case 56: |
995 | // XANDD, XANDW32 |
996 | O << ") &= " ; |
997 | printOperand(MI, OpNo: 3, O); |
998 | return; |
999 | break; |
1000 | case 57: |
1001 | // XCHGD |
1002 | O << " = xchg_64(" ; |
1003 | printMemOperand(MI, OpNo: 1, O); |
1004 | O << ", " ; |
1005 | printOperand(MI, OpNo: 3, O); |
1006 | O << ')'; |
1007 | return; |
1008 | break; |
1009 | case 58: |
1010 | // XCHGW32 |
1011 | O << " = xchg32_32(" ; |
1012 | printMemOperand(MI, OpNo: 1, O); |
1013 | O << ", " ; |
1014 | printOperand(MI, OpNo: 3, O); |
1015 | O << ')'; |
1016 | return; |
1017 | break; |
1018 | case 59: |
1019 | // XFADDD |
1020 | O << " = atomic_fetch_add((u64 *)(" ; |
1021 | printMemOperand(MI, OpNo: 1, O); |
1022 | O << "), " ; |
1023 | printOperand(MI, OpNo: 3, O); |
1024 | O << ')'; |
1025 | return; |
1026 | break; |
1027 | case 60: |
1028 | // XFADDW32 |
1029 | O << " = atomic_fetch_add((u32 *)(" ; |
1030 | printMemOperand(MI, OpNo: 1, O); |
1031 | O << "), " ; |
1032 | printOperand(MI, OpNo: 3, O); |
1033 | O << ')'; |
1034 | return; |
1035 | break; |
1036 | case 61: |
1037 | // XFANDD |
1038 | O << " = atomic_fetch_and((u64 *)(" ; |
1039 | printMemOperand(MI, OpNo: 1, O); |
1040 | O << "), " ; |
1041 | printOperand(MI, OpNo: 3, O); |
1042 | O << ')'; |
1043 | return; |
1044 | break; |
1045 | case 62: |
1046 | // XFANDW32 |
1047 | O << " = atomic_fetch_and((u32 *)(" ; |
1048 | printMemOperand(MI, OpNo: 1, O); |
1049 | O << "), " ; |
1050 | printOperand(MI, OpNo: 3, O); |
1051 | O << ')'; |
1052 | return; |
1053 | break; |
1054 | case 63: |
1055 | // XFORD |
1056 | O << " = atomic_fetch_or((u64 *)(" ; |
1057 | printMemOperand(MI, OpNo: 1, O); |
1058 | O << "), " ; |
1059 | printOperand(MI, OpNo: 3, O); |
1060 | O << ')'; |
1061 | return; |
1062 | break; |
1063 | case 64: |
1064 | // XFORW32 |
1065 | O << " = atomic_fetch_or((u32 *)(" ; |
1066 | printMemOperand(MI, OpNo: 1, O); |
1067 | O << "), " ; |
1068 | printOperand(MI, OpNo: 3, O); |
1069 | O << ')'; |
1070 | return; |
1071 | break; |
1072 | case 65: |
1073 | // XFXORD |
1074 | O << " = atomic_fetch_xor((u64 *)(" ; |
1075 | printMemOperand(MI, OpNo: 1, O); |
1076 | O << "), " ; |
1077 | printOperand(MI, OpNo: 3, O); |
1078 | O << ')'; |
1079 | return; |
1080 | break; |
1081 | case 66: |
1082 | // XFXORW32 |
1083 | O << " = atomic_fetch_xor((u32 *)(" ; |
1084 | printMemOperand(MI, OpNo: 1, O); |
1085 | O << "), " ; |
1086 | printOperand(MI, OpNo: 3, O); |
1087 | O << ')'; |
1088 | return; |
1089 | break; |
1090 | case 67: |
1091 | // XORD, XORW32 |
1092 | O << ") |= " ; |
1093 | printOperand(MI, OpNo: 3, O); |
1094 | return; |
1095 | break; |
1096 | case 68: |
1097 | // XOR_ri, XOR_ri_32, XOR_rr, XOR_rr_32 |
1098 | O << " ^= " ; |
1099 | printOperand(MI, OpNo: 2, O); |
1100 | return; |
1101 | break; |
1102 | case 69: |
1103 | // XXORD, XXORW32 |
1104 | O << ") ^= " ; |
1105 | printOperand(MI, OpNo: 3, O); |
1106 | return; |
1107 | break; |
1108 | } |
1109 | |
1110 | |
1111 | // Fragment 2 encoded into 2 bits for 3 unique commands. |
1112 | switch ((Bits >> 20) & 3) { |
1113 | default: llvm_unreachable("Invalid command number." ); |
1114 | case 0: |
1115 | // FI_ri |
1116 | printMemOperand(MI, OpNo: 1, O); |
1117 | return; |
1118 | break; |
1119 | case 1: |
1120 | // Select, Select_32, Select_32_64, Select_64_32, Select_Ri, Select_Ri_32... |
1121 | printOperand(MI, OpNo: 1, O); |
1122 | break; |
1123 | case 2: |
1124 | // CORE_ST, LD_imm64 |
1125 | printImm64Operand(MI, OpNo: 1, O); |
1126 | break; |
1127 | } |
1128 | |
1129 | |
1130 | // Fragment 3 encoded into 2 bits for 4 unique commands. |
1131 | switch ((Bits >> 22) & 3) { |
1132 | default: llvm_unreachable("Invalid command number." ); |
1133 | case 0: |
1134 | // Select, Select_32, Select_32_64, Select_64_32, Select_Ri, Select_Ri_32... |
1135 | O << ' '; |
1136 | printOperand(MI, OpNo: 3, O); |
1137 | O << ' '; |
1138 | printOperand(MI, OpNo: 2, O); |
1139 | O << " ? " ; |
1140 | printOperand(MI, OpNo: 4, O); |
1141 | O << " : " ; |
1142 | printOperand(MI, OpNo: 5, O); |
1143 | return; |
1144 | break; |
1145 | case 1: |
1146 | // CORE_ST, LD_pseudo |
1147 | O << ", " ; |
1148 | break; |
1149 | case 2: |
1150 | // LD_imm64 |
1151 | O << " ll" ; |
1152 | return; |
1153 | break; |
1154 | case 3: |
1155 | // MOV_32_64, MOV_ri, MOV_ri_32, MOV_rr, MOV_rr_32 |
1156 | return; |
1157 | break; |
1158 | } |
1159 | |
1160 | |
1161 | // Fragment 4 encoded into 1 bits for 2 unique commands. |
1162 | if ((Bits >> 24) & 1) { |
1163 | // LD_pseudo |
1164 | printImm64Operand(MI, OpNo: 2, O); |
1165 | return; |
1166 | } else { |
1167 | // CORE_ST |
1168 | printOperand(MI, OpNo: 2, O); |
1169 | O << ", " ; |
1170 | printImm64Operand(MI, OpNo: 3, O); |
1171 | O << ')'; |
1172 | return; |
1173 | } |
1174 | |
1175 | } |
1176 | |
1177 | |
1178 | /// getRegisterName - This method is automatically generated by tblgen |
1179 | /// from the register set description. This returns the assembler name |
1180 | /// for the specified register. |
1181 | const char *BPFInstPrinter::getRegisterName(MCRegister Reg) { |
1182 | unsigned RegNo = Reg.id(); |
1183 | assert(RegNo && RegNo < 25 && "Invalid register number!" ); |
1184 | |
1185 | |
1186 | #ifdef __GNUC__ |
1187 | #pragma GCC diagnostic push |
1188 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
1189 | #endif |
1190 | static const char AsmStrs[] = { |
1191 | /* 0 */ "r10\0" |
1192 | /* 4 */ "w10\0" |
1193 | /* 8 */ "r0\0" |
1194 | /* 11 */ "w0\0" |
1195 | /* 14 */ "r11\0" |
1196 | /* 18 */ "w11\0" |
1197 | /* 22 */ "r1\0" |
1198 | /* 25 */ "w1\0" |
1199 | /* 28 */ "r2\0" |
1200 | /* 31 */ "w2\0" |
1201 | /* 34 */ "r3\0" |
1202 | /* 37 */ "w3\0" |
1203 | /* 40 */ "r4\0" |
1204 | /* 43 */ "w4\0" |
1205 | /* 46 */ "r5\0" |
1206 | /* 49 */ "w5\0" |
1207 | /* 52 */ "r6\0" |
1208 | /* 55 */ "w6\0" |
1209 | /* 58 */ "r7\0" |
1210 | /* 61 */ "w7\0" |
1211 | /* 64 */ "r8\0" |
1212 | /* 67 */ "w8\0" |
1213 | /* 70 */ "r9\0" |
1214 | /* 73 */ "w9\0" |
1215 | }; |
1216 | #ifdef __GNUC__ |
1217 | #pragma GCC diagnostic pop |
1218 | #endif |
1219 | |
1220 | static const uint8_t RegAsmOffset[] = { |
1221 | 8, 22, 28, 34, 40, 46, 52, 58, 64, 70, 0, 14, 11, 25, |
1222 | 31, 37, 43, 49, 55, 61, 67, 73, 4, 18, |
1223 | }; |
1224 | |
1225 | assert (*(AsmStrs+RegAsmOffset[RegNo-1]) && |
1226 | "Invalid alt name index for register!" ); |
1227 | return AsmStrs+RegAsmOffset[RegNo-1]; |
1228 | } |
1229 | |
1230 | #ifdef PRINT_ALIAS_INSTR |
1231 | #undef PRINT_ALIAS_INSTR |
1232 | |
1233 | bool BPFInstPrinter::printAliasInstr(const MCInst *MI, uint64_t Address, raw_ostream &OS) { |
1234 | return false; |
1235 | } |
1236 | |
1237 | #endif // PRINT_ALIAS_INSTR |
1238 | |