xref: /openbmc/qemu/target/loongarch/disas.c (revision d67c54d0)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * QEMU LoongArch Disassembler
4  *
5  * Copyright (c) 2021 Loongson Technology Corporation Limited.
6  */
7 
8 #include "qemu/osdep.h"
9 #include "disas/dis-asm.h"
10 #include "qemu/bitops.h"
11 #include "cpu-csr.h"
12 
13 typedef struct {
14     disassemble_info *info;
15     uint64_t pc;
16     uint32_t insn;
17 } DisasContext;
18 
19 static inline int plus_1(DisasContext *ctx, int x)
20 {
21     return x + 1;
22 }
23 
24 static inline int shl_1(DisasContext *ctx, int x)
25 {
26     return x << 1;
27 }
28 
29 static inline int shl_2(DisasContext *ctx, int x)
30 {
31     return x << 2;
32 }
33 
34 static inline int shl_3(DisasContext *ctx, int x)
35 {
36     return x << 3;
37 }
38 
39 #define CSR_NAME(REG) \
40     [LOONGARCH_CSR_##REG] = (#REG)
41 
42 static const char * const csr_names[] = {
43     CSR_NAME(CRMD),
44     CSR_NAME(PRMD),
45     CSR_NAME(EUEN),
46     CSR_NAME(MISC),
47     CSR_NAME(ECFG),
48     CSR_NAME(ESTAT),
49     CSR_NAME(ERA),
50     CSR_NAME(BADV),
51     CSR_NAME(BADI),
52     CSR_NAME(EENTRY),
53     CSR_NAME(TLBIDX),
54     CSR_NAME(TLBEHI),
55     CSR_NAME(TLBELO0),
56     CSR_NAME(TLBELO1),
57     CSR_NAME(ASID),
58     CSR_NAME(PGDL),
59     CSR_NAME(PGDH),
60     CSR_NAME(PGD),
61     CSR_NAME(PWCL),
62     CSR_NAME(PWCH),
63     CSR_NAME(STLBPS),
64     CSR_NAME(RVACFG),
65     CSR_NAME(CPUID),
66     CSR_NAME(PRCFG1),
67     CSR_NAME(PRCFG2),
68     CSR_NAME(PRCFG3),
69     CSR_NAME(SAVE(0)),
70     CSR_NAME(SAVE(1)),
71     CSR_NAME(SAVE(2)),
72     CSR_NAME(SAVE(3)),
73     CSR_NAME(SAVE(4)),
74     CSR_NAME(SAVE(5)),
75     CSR_NAME(SAVE(6)),
76     CSR_NAME(SAVE(7)),
77     CSR_NAME(SAVE(8)),
78     CSR_NAME(SAVE(9)),
79     CSR_NAME(SAVE(10)),
80     CSR_NAME(SAVE(11)),
81     CSR_NAME(SAVE(12)),
82     CSR_NAME(SAVE(13)),
83     CSR_NAME(SAVE(14)),
84     CSR_NAME(SAVE(15)),
85     CSR_NAME(TID),
86     CSR_NAME(TCFG),
87     CSR_NAME(TVAL),
88     CSR_NAME(CNTC),
89     CSR_NAME(TICLR),
90     CSR_NAME(LLBCTL),
91     CSR_NAME(IMPCTL1),
92     CSR_NAME(IMPCTL2),
93     CSR_NAME(TLBRENTRY),
94     CSR_NAME(TLBRBADV),
95     CSR_NAME(TLBRERA),
96     CSR_NAME(TLBRSAVE),
97     CSR_NAME(TLBRELO0),
98     CSR_NAME(TLBRELO1),
99     CSR_NAME(TLBREHI),
100     CSR_NAME(TLBRPRMD),
101     CSR_NAME(MERRCTL),
102     CSR_NAME(MERRINFO1),
103     CSR_NAME(MERRINFO2),
104     CSR_NAME(MERRENTRY),
105     CSR_NAME(MERRERA),
106     CSR_NAME(MERRSAVE),
107     CSR_NAME(CTAG),
108     CSR_NAME(DMW(0)),
109     CSR_NAME(DMW(1)),
110     CSR_NAME(DMW(2)),
111     CSR_NAME(DMW(3)),
112     CSR_NAME(DBG),
113     CSR_NAME(DERA),
114     CSR_NAME(DSAVE),
115 };
116 
117 static const char *get_csr_name(unsigned num)
118 {
119     return ((num < ARRAY_SIZE(csr_names)) && (csr_names[num] != NULL)) ?
120            csr_names[num] : "Undefined CSR";
121 }
122 
123 #define output(C, INSN, FMT, ...)                                   \
124 {                                                                   \
125     (C)->info->fprintf_func((C)->info->stream, "%08x   %-9s\t" FMT, \
126                             (C)->insn, INSN, ##__VA_ARGS__);        \
127 }
128 
129 #include "decode-insns.c.inc"
130 
131 int print_insn_loongarch(bfd_vma memaddr, struct disassemble_info *info)
132 {
133     bfd_byte buffer[4];
134     uint32_t insn;
135     int status;
136 
137     status = (*info->read_memory_func)(memaddr, buffer, 4, info);
138     if (status != 0) {
139         (*info->memory_error_func)(status, memaddr, info);
140         return -1;
141     }
142     insn = bfd_getl32(buffer);
143     DisasContext ctx = {
144         .info = info,
145         .pc = memaddr,
146         .insn = insn
147     };
148 
149     if (!decode(&ctx, insn)) {
150         output(&ctx, "illegal", "");
151     }
152     return 4;
153 }
154 
155 static void output_r_i(DisasContext *ctx, arg_r_i *a, const char *mnemonic)
156 {
157     output(ctx, mnemonic, "r%d, %d", a->rd, a->imm);
158 }
159 
160 static void output_rrr(DisasContext *ctx, arg_rrr *a, const char *mnemonic)
161 {
162     output(ctx, mnemonic, "r%d, r%d, r%d", a->rd, a->rj, a->rk);
163 }
164 
165 static void output_rr_i(DisasContext *ctx, arg_rr_i *a, const char *mnemonic)
166 {
167     output(ctx, mnemonic, "r%d, r%d, %d", a->rd, a->rj, a->imm);
168 }
169 
170 static void output_rrr_sa(DisasContext *ctx, arg_rrr_sa *a,
171                           const char *mnemonic)
172 {
173     output(ctx, mnemonic, "r%d, r%d, r%d, %d", a->rd, a->rj, a->rk, a->sa);
174 }
175 
176 static void output_rr(DisasContext *ctx, arg_rr *a, const char *mnemonic)
177 {
178     output(ctx, mnemonic, "r%d, r%d", a->rd, a->rj);
179 }
180 
181 static void output_rr_ms_ls(DisasContext *ctx, arg_rr_ms_ls *a,
182                           const char *mnemonic)
183 {
184     output(ctx, mnemonic, "r%d, r%d, %d, %d", a->rd, a->rj, a->ms, a->ls);
185 }
186 
187 static void output_hint_r_i(DisasContext *ctx, arg_hint_r_i *a,
188                             const char *mnemonic)
189 {
190     output(ctx, mnemonic, "%d, r%d, %d", a->hint, a->rj, a->imm);
191 }
192 
193 static void output_hint_rr(DisasContext *ctx, arg_hint_rr *a,
194                            const char *mnemonic)
195 {
196     output(ctx, mnemonic, "%d, r%d, r%d", a->hint, a->rj, a->rk);
197 }
198 
199 static void output_i(DisasContext *ctx, arg_i *a, const char *mnemonic)
200 {
201     output(ctx, mnemonic, "%d", a->imm);
202 }
203 
204 static void output_rr_jk(DisasContext *ctx, arg_rr_jk *a,
205                          const char *mnemonic)
206 {
207     output(ctx, mnemonic, "r%d, r%d", a->rj, a->rk);
208 }
209 
210 static void output_ff(DisasContext *ctx, arg_ff *a, const char *mnemonic)
211 {
212     output(ctx, mnemonic, "f%d, f%d", a->fd, a->fj);
213 }
214 
215 static void output_fff(DisasContext *ctx, arg_fff *a, const char *mnemonic)
216 {
217     output(ctx, mnemonic, "f%d, f%d, f%d", a->fd, a->fj, a->fk);
218 }
219 
220 static void output_ffff(DisasContext *ctx, arg_ffff *a, const char *mnemonic)
221 {
222     output(ctx, mnemonic, "f%d, f%d, f%d, f%d", a->fd, a->fj, a->fk, a->fa);
223 }
224 
225 static void output_fffc(DisasContext *ctx, arg_fffc *a, const char *mnemonic)
226 {
227     output(ctx, mnemonic, "f%d, f%d, f%d, %d", a->fd, a->fj, a->fk, a->ca);
228 }
229 
230 static void output_fr(DisasContext *ctx, arg_fr *a, const char *mnemonic)
231 {
232     output(ctx, mnemonic, "f%d, r%d", a->fd, a->rj);
233 }
234 
235 static void output_rf(DisasContext *ctx, arg_rf *a, const char *mnemonic)
236 {
237     output(ctx, mnemonic, "r%d, f%d", a->rd, a->fj);
238 }
239 
240 static void output_fcsrd_r(DisasContext *ctx, arg_fcsrd_r *a,
241                            const char *mnemonic)
242 {
243     output(ctx, mnemonic, "fcsr%d, r%d", a->fcsrd, a->rj);
244 }
245 
246 static void output_r_fcsrs(DisasContext *ctx, arg_r_fcsrs *a,
247                            const char *mnemonic)
248 {
249     output(ctx, mnemonic, "r%d, fcsr%d", a->rd, a->fcsrs);
250 }
251 
252 static void output_cf(DisasContext *ctx, arg_cf *a, const char *mnemonic)
253 {
254     output(ctx, mnemonic, "fcc%d, f%d", a->cd, a->fj);
255 }
256 
257 static void output_fc(DisasContext *ctx, arg_fc *a, const char *mnemonic)
258 {
259     output(ctx, mnemonic, "f%d, fcc%d", a->fd, a->cj);
260 }
261 
262 static void output_cr(DisasContext *ctx, arg_cr *a, const char *mnemonic)
263 {
264     output(ctx, mnemonic, "fcc%d, r%d", a->cd, a->rj);
265 }
266 
267 static void output_rc(DisasContext *ctx, arg_rc *a, const char *mnemonic)
268 {
269     output(ctx, mnemonic, "r%d, fcc%d", a->rd, a->cj);
270 }
271 
272 static void output_frr(DisasContext *ctx, arg_frr *a, const char *mnemonic)
273 {
274     output(ctx, mnemonic, "f%d, r%d, r%d", a->fd, a->rj, a->rk);
275 }
276 
277 static void output_fr_i(DisasContext *ctx, arg_fr_i *a, const char *mnemonic)
278 {
279     output(ctx, mnemonic, "f%d, r%d, %d", a->fd, a->rj, a->imm);
280 }
281 
282 static void output_r_offs(DisasContext *ctx, arg_r_offs *a,
283                           const char *mnemonic)
284 {
285     output(ctx, mnemonic, "r%d, %d # 0x%" PRIx64, a->rj, a->offs,
286            ctx->pc + a->offs);
287 }
288 
289 static void output_c_offs(DisasContext *ctx, arg_c_offs *a,
290                           const char *mnemonic)
291 {
292     output(ctx, mnemonic, "fcc%d, %d # 0x%" PRIx64, a->cj, a->offs,
293            ctx->pc + a->offs);
294 }
295 
296 static void output_offs(DisasContext *ctx, arg_offs *a,
297                         const char *mnemonic)
298 {
299     output(ctx, mnemonic, "%d # 0x%" PRIx64, a->offs, ctx->pc + a->offs);
300 }
301 
302 static void output_rr_offs(DisasContext *ctx, arg_rr_offs *a,
303                            const char *mnemonic)
304 {
305     output(ctx, mnemonic, "r%d, r%d, %d # 0x%" PRIx64, a->rj,
306            a->rd, a->offs, ctx->pc + a->offs);
307 }
308 
309 static void output_r_csr(DisasContext *ctx, arg_r_csr *a,
310                          const char *mnemonic)
311 {
312     output(ctx, mnemonic, "r%d, %d # %s", a->rd, a->csr, get_csr_name(a->csr));
313 }
314 
315 static void output_rr_csr(DisasContext *ctx, arg_rr_csr *a,
316                           const char *mnemonic)
317 {
318     output(ctx, mnemonic, "r%d, r%d, %d # %s",
319            a->rd, a->rj, a->csr, get_csr_name(a->csr));
320 }
321 
322 static void output_empty(DisasContext *ctx, arg_empty *a,
323                          const char *mnemonic)
324 {
325     output(ctx, mnemonic, "");
326 }
327 
328 static void output_i_rr(DisasContext *ctx, arg_i_rr *a, const char *mnemonic)
329 {
330     output(ctx, mnemonic, "%d, r%d, r%d", a->imm, a->rj, a->rk);
331 }
332 
333 static void output_cop_r_i(DisasContext *ctx, arg_cop_r_i *a,
334                            const char *mnemonic)
335 {
336     output(ctx, mnemonic, "%d, r%d, %d", a->cop, a->rj, a->imm);
337 }
338 
339 static void output_j_i(DisasContext *ctx, arg_j_i *a, const char *mnemonic)
340 {
341     output(ctx, mnemonic, "r%d, %d", a->rj, a->imm);
342 }
343 
344 #define INSN(insn, type)                                    \
345 static bool trans_##insn(DisasContext *ctx, arg_##type * a) \
346 {                                                           \
347     output_##type(ctx, a, #insn);                           \
348     return true;                                            \
349 }
350 
351 INSN(clo_w,        rr)
352 INSN(clz_w,        rr)
353 INSN(cto_w,        rr)
354 INSN(ctz_w,        rr)
355 INSN(clo_d,        rr)
356 INSN(clz_d,        rr)
357 INSN(cto_d,        rr)
358 INSN(ctz_d,        rr)
359 INSN(revb_2h,      rr)
360 INSN(revb_4h,      rr)
361 INSN(revb_2w,      rr)
362 INSN(revb_d,       rr)
363 INSN(revh_2w,      rr)
364 INSN(revh_d,       rr)
365 INSN(bitrev_4b,    rr)
366 INSN(bitrev_8b,    rr)
367 INSN(bitrev_w,     rr)
368 INSN(bitrev_d,     rr)
369 INSN(ext_w_h,      rr)
370 INSN(ext_w_b,      rr)
371 INSN(rdtimel_w,    rr)
372 INSN(rdtimeh_w,    rr)
373 INSN(rdtime_d,     rr)
374 INSN(cpucfg,       rr)
375 INSN(asrtle_d,     rr_jk)
376 INSN(asrtgt_d,     rr_jk)
377 INSN(alsl_w,       rrr_sa)
378 INSN(alsl_wu,      rrr_sa)
379 INSN(bytepick_w,   rrr_sa)
380 INSN(bytepick_d,   rrr_sa)
381 INSN(add_w,        rrr)
382 INSN(add_d,        rrr)
383 INSN(sub_w,        rrr)
384 INSN(sub_d,        rrr)
385 INSN(slt,          rrr)
386 INSN(sltu,         rrr)
387 INSN(maskeqz,      rrr)
388 INSN(masknez,      rrr)
389 INSN(nor,          rrr)
390 INSN(and,          rrr)
391 INSN(or,           rrr)
392 INSN(xor,          rrr)
393 INSN(orn,          rrr)
394 INSN(andn,         rrr)
395 INSN(sll_w,        rrr)
396 INSN(srl_w,        rrr)
397 INSN(sra_w,        rrr)
398 INSN(sll_d,        rrr)
399 INSN(srl_d,        rrr)
400 INSN(sra_d,        rrr)
401 INSN(rotr_w,       rrr)
402 INSN(rotr_d,       rrr)
403 INSN(mul_w,        rrr)
404 INSN(mulh_w,       rrr)
405 INSN(mulh_wu,      rrr)
406 INSN(mul_d,        rrr)
407 INSN(mulh_d,       rrr)
408 INSN(mulh_du,      rrr)
409 INSN(mulw_d_w,     rrr)
410 INSN(mulw_d_wu,    rrr)
411 INSN(div_w,        rrr)
412 INSN(mod_w,        rrr)
413 INSN(div_wu,       rrr)
414 INSN(mod_wu,       rrr)
415 INSN(div_d,        rrr)
416 INSN(mod_d,        rrr)
417 INSN(div_du,       rrr)
418 INSN(mod_du,       rrr)
419 INSN(crc_w_b_w,    rrr)
420 INSN(crc_w_h_w,    rrr)
421 INSN(crc_w_w_w,    rrr)
422 INSN(crc_w_d_w,    rrr)
423 INSN(crcc_w_b_w,   rrr)
424 INSN(crcc_w_h_w,   rrr)
425 INSN(crcc_w_w_w,   rrr)
426 INSN(crcc_w_d_w,   rrr)
427 INSN(break,        i)
428 INSN(syscall,      i)
429 INSN(alsl_d,       rrr_sa)
430 INSN(slli_w,       rr_i)
431 INSN(slli_d,       rr_i)
432 INSN(srli_w,       rr_i)
433 INSN(srli_d,       rr_i)
434 INSN(srai_w,       rr_i)
435 INSN(srai_d,       rr_i)
436 INSN(rotri_w,      rr_i)
437 INSN(rotri_d,      rr_i)
438 INSN(bstrins_w,    rr_ms_ls)
439 INSN(bstrpick_w,   rr_ms_ls)
440 INSN(bstrins_d,    rr_ms_ls)
441 INSN(bstrpick_d,   rr_ms_ls)
442 INSN(fadd_s,       fff)
443 INSN(fadd_d,       fff)
444 INSN(fsub_s,       fff)
445 INSN(fsub_d,       fff)
446 INSN(fmul_s,       fff)
447 INSN(fmul_d,       fff)
448 INSN(fdiv_s,       fff)
449 INSN(fdiv_d,       fff)
450 INSN(fmax_s,       fff)
451 INSN(fmax_d,       fff)
452 INSN(fmin_s,       fff)
453 INSN(fmin_d,       fff)
454 INSN(fmaxa_s,      fff)
455 INSN(fmaxa_d,      fff)
456 INSN(fmina_s,      fff)
457 INSN(fmina_d,      fff)
458 INSN(fscaleb_s,    fff)
459 INSN(fscaleb_d,    fff)
460 INSN(fcopysign_s,  fff)
461 INSN(fcopysign_d,  fff)
462 INSN(fabs_s,       ff)
463 INSN(fabs_d,       ff)
464 INSN(fneg_s,       ff)
465 INSN(fneg_d,       ff)
466 INSN(flogb_s,      ff)
467 INSN(flogb_d,      ff)
468 INSN(fclass_s,     ff)
469 INSN(fclass_d,     ff)
470 INSN(fsqrt_s,      ff)
471 INSN(fsqrt_d,      ff)
472 INSN(frecip_s,     ff)
473 INSN(frecip_d,     ff)
474 INSN(frsqrt_s,     ff)
475 INSN(frsqrt_d,     ff)
476 INSN(fmov_s,       ff)
477 INSN(fmov_d,       ff)
478 INSN(movgr2fr_w,   fr)
479 INSN(movgr2fr_d,   fr)
480 INSN(movgr2frh_w,  fr)
481 INSN(movfr2gr_s,   rf)
482 INSN(movfr2gr_d,   rf)
483 INSN(movfrh2gr_s,  rf)
484 INSN(movgr2fcsr,   fcsrd_r)
485 INSN(movfcsr2gr,   r_fcsrs)
486 INSN(movfr2cf,     cf)
487 INSN(movcf2fr,     fc)
488 INSN(movgr2cf,     cr)
489 INSN(movcf2gr,     rc)
490 INSN(fcvt_s_d,     ff)
491 INSN(fcvt_d_s,     ff)
492 INSN(ftintrm_w_s,  ff)
493 INSN(ftintrm_w_d,  ff)
494 INSN(ftintrm_l_s,  ff)
495 INSN(ftintrm_l_d,  ff)
496 INSN(ftintrp_w_s,  ff)
497 INSN(ftintrp_w_d,  ff)
498 INSN(ftintrp_l_s,  ff)
499 INSN(ftintrp_l_d,  ff)
500 INSN(ftintrz_w_s,  ff)
501 INSN(ftintrz_w_d,  ff)
502 INSN(ftintrz_l_s,  ff)
503 INSN(ftintrz_l_d,  ff)
504 INSN(ftintrne_w_s, ff)
505 INSN(ftintrne_w_d, ff)
506 INSN(ftintrne_l_s, ff)
507 INSN(ftintrne_l_d, ff)
508 INSN(ftint_w_s,    ff)
509 INSN(ftint_w_d,    ff)
510 INSN(ftint_l_s,    ff)
511 INSN(ftint_l_d,    ff)
512 INSN(ffint_s_w,    ff)
513 INSN(ffint_s_l,    ff)
514 INSN(ffint_d_w,    ff)
515 INSN(ffint_d_l,    ff)
516 INSN(frint_s,      ff)
517 INSN(frint_d,      ff)
518 INSN(slti,         rr_i)
519 INSN(sltui,        rr_i)
520 INSN(addi_w,       rr_i)
521 INSN(addi_d,       rr_i)
522 INSN(lu52i_d,      rr_i)
523 INSN(andi,         rr_i)
524 INSN(ori,          rr_i)
525 INSN(xori,         rr_i)
526 INSN(fmadd_s,      ffff)
527 INSN(fmadd_d,      ffff)
528 INSN(fmsub_s,      ffff)
529 INSN(fmsub_d,      ffff)
530 INSN(fnmadd_s,     ffff)
531 INSN(fnmadd_d,     ffff)
532 INSN(fnmsub_s,     ffff)
533 INSN(fnmsub_d,     ffff)
534 INSN(fsel,         fffc)
535 INSN(addu16i_d,    rr_i)
536 INSN(lu12i_w,      r_i)
537 INSN(lu32i_d,      r_i)
538 INSN(ll_w,         rr_i)
539 INSN(sc_w,         rr_i)
540 INSN(ll_d,         rr_i)
541 INSN(sc_d,         rr_i)
542 INSN(ldptr_w,      rr_i)
543 INSN(stptr_w,      rr_i)
544 INSN(ldptr_d,      rr_i)
545 INSN(stptr_d,      rr_i)
546 INSN(ld_b,         rr_i)
547 INSN(ld_h,         rr_i)
548 INSN(ld_w,         rr_i)
549 INSN(ld_d,         rr_i)
550 INSN(st_b,         rr_i)
551 INSN(st_h,         rr_i)
552 INSN(st_w,         rr_i)
553 INSN(st_d,         rr_i)
554 INSN(ld_bu,        rr_i)
555 INSN(ld_hu,        rr_i)
556 INSN(ld_wu,        rr_i)
557 INSN(preld,        hint_r_i)
558 INSN(preldx,       hint_rr)
559 INSN(fld_s,        fr_i)
560 INSN(fst_s,        fr_i)
561 INSN(fld_d,        fr_i)
562 INSN(fst_d,        fr_i)
563 INSN(ldx_b,        rrr)
564 INSN(ldx_h,        rrr)
565 INSN(ldx_w,        rrr)
566 INSN(ldx_d,        rrr)
567 INSN(stx_b,        rrr)
568 INSN(stx_h,        rrr)
569 INSN(stx_w,        rrr)
570 INSN(stx_d,        rrr)
571 INSN(ldx_bu,       rrr)
572 INSN(ldx_hu,       rrr)
573 INSN(ldx_wu,       rrr)
574 INSN(fldx_s,       frr)
575 INSN(fldx_d,       frr)
576 INSN(fstx_s,       frr)
577 INSN(fstx_d,       frr)
578 INSN(amswap_w,     rrr)
579 INSN(amswap_d,     rrr)
580 INSN(amadd_w,      rrr)
581 INSN(amadd_d,      rrr)
582 INSN(amand_w,      rrr)
583 INSN(amand_d,      rrr)
584 INSN(amor_w,       rrr)
585 INSN(amor_d,       rrr)
586 INSN(amxor_w,      rrr)
587 INSN(amxor_d,      rrr)
588 INSN(ammax_w,      rrr)
589 INSN(ammax_d,      rrr)
590 INSN(ammin_w,      rrr)
591 INSN(ammin_d,      rrr)
592 INSN(ammax_wu,     rrr)
593 INSN(ammax_du,     rrr)
594 INSN(ammin_wu,     rrr)
595 INSN(ammin_du,     rrr)
596 INSN(amswap_db_w,  rrr)
597 INSN(amswap_db_d,  rrr)
598 INSN(amadd_db_w,   rrr)
599 INSN(amadd_db_d,   rrr)
600 INSN(amand_db_w,   rrr)
601 INSN(amand_db_d,   rrr)
602 INSN(amor_db_w,    rrr)
603 INSN(amor_db_d,    rrr)
604 INSN(amxor_db_w,   rrr)
605 INSN(amxor_db_d,   rrr)
606 INSN(ammax_db_w,   rrr)
607 INSN(ammax_db_d,   rrr)
608 INSN(ammin_db_w,   rrr)
609 INSN(ammin_db_d,   rrr)
610 INSN(ammax_db_wu,  rrr)
611 INSN(ammax_db_du,  rrr)
612 INSN(ammin_db_wu,  rrr)
613 INSN(ammin_db_du,  rrr)
614 INSN(dbar,         i)
615 INSN(ibar,         i)
616 INSN(fldgt_s,      frr)
617 INSN(fldgt_d,      frr)
618 INSN(fldle_s,      frr)
619 INSN(fldle_d,      frr)
620 INSN(fstgt_s,      frr)
621 INSN(fstgt_d,      frr)
622 INSN(fstle_s,      frr)
623 INSN(fstle_d,      frr)
624 INSN(ldgt_b,       rrr)
625 INSN(ldgt_h,       rrr)
626 INSN(ldgt_w,       rrr)
627 INSN(ldgt_d,       rrr)
628 INSN(ldle_b,       rrr)
629 INSN(ldle_h,       rrr)
630 INSN(ldle_w,       rrr)
631 INSN(ldle_d,       rrr)
632 INSN(stgt_b,       rrr)
633 INSN(stgt_h,       rrr)
634 INSN(stgt_w,       rrr)
635 INSN(stgt_d,       rrr)
636 INSN(stle_b,       rrr)
637 INSN(stle_h,       rrr)
638 INSN(stle_w,       rrr)
639 INSN(stle_d,       rrr)
640 INSN(beqz,         r_offs)
641 INSN(bnez,         r_offs)
642 INSN(bceqz,        c_offs)
643 INSN(bcnez,        c_offs)
644 INSN(jirl,         rr_i)
645 INSN(b,            offs)
646 INSN(bl,           offs)
647 INSN(beq,          rr_offs)
648 INSN(bne,          rr_offs)
649 INSN(blt,          rr_offs)
650 INSN(bge,          rr_offs)
651 INSN(bltu,         rr_offs)
652 INSN(bgeu,         rr_offs)
653 INSN(csrrd,        r_csr)
654 INSN(csrwr,        r_csr)
655 INSN(csrxchg,      rr_csr)
656 INSN(iocsrrd_b,    rr)
657 INSN(iocsrrd_h,    rr)
658 INSN(iocsrrd_w,    rr)
659 INSN(iocsrrd_d,    rr)
660 INSN(iocsrwr_b,    rr)
661 INSN(iocsrwr_h,    rr)
662 INSN(iocsrwr_w,    rr)
663 INSN(iocsrwr_d,    rr)
664 INSN(tlbsrch,      empty)
665 INSN(tlbrd,        empty)
666 INSN(tlbwr,        empty)
667 INSN(tlbfill,      empty)
668 INSN(tlbclr,       empty)
669 INSN(tlbflush,     empty)
670 INSN(invtlb,       i_rr)
671 INSN(cacop,        cop_r_i)
672 INSN(lddir,        rr_i)
673 INSN(ldpte,        j_i)
674 INSN(ertn,         empty)
675 INSN(idle,         i)
676 INSN(dbcl,         i)
677 
678 #define output_fcmp(C, PREFIX, SUFFIX)                                         \
679 {                                                                              \
680     (C)->info->fprintf_func((C)->info->stream, "%08x   %s%s\tfcc%d, f%d, f%d", \
681                             (C)->insn, PREFIX, SUFFIX, a->cd,                  \
682                             a->fj, a->fk);                                     \
683 }
684 
685 static bool output_cff_fcond(DisasContext *ctx, arg_cff_fcond * a,
686                                const char *suffix)
687 {
688     bool ret = true;
689     switch (a->fcond) {
690     case 0x0:
691         output_fcmp(ctx, "fcmp_caf_", suffix);
692         break;
693     case 0x1:
694         output_fcmp(ctx, "fcmp_saf_", suffix);
695         break;
696     case 0x2:
697         output_fcmp(ctx, "fcmp_clt_", suffix);
698         break;
699     case 0x3:
700         output_fcmp(ctx, "fcmp_slt_", suffix);
701         break;
702     case 0x4:
703         output_fcmp(ctx, "fcmp_ceq_", suffix);
704         break;
705     case 0x5:
706         output_fcmp(ctx, "fcmp_seq_", suffix);
707         break;
708     case 0x6:
709         output_fcmp(ctx, "fcmp_cle_", suffix);
710         break;
711     case 0x7:
712         output_fcmp(ctx, "fcmp_sle_", suffix);
713         break;
714     case 0x8:
715         output_fcmp(ctx, "fcmp_cun_", suffix);
716         break;
717     case 0x9:
718         output_fcmp(ctx, "fcmp_sun_", suffix);
719         break;
720     case 0xA:
721         output_fcmp(ctx, "fcmp_cult_", suffix);
722         break;
723     case 0xB:
724         output_fcmp(ctx, "fcmp_sult_", suffix);
725         break;
726     case 0xC:
727         output_fcmp(ctx, "fcmp_cueq_", suffix);
728         break;
729     case 0xD:
730         output_fcmp(ctx, "fcmp_sueq_", suffix);
731         break;
732     case 0xE:
733         output_fcmp(ctx, "fcmp_cule_", suffix);
734         break;
735     case 0xF:
736         output_fcmp(ctx, "fcmp_sule_", suffix);
737         break;
738     case 0x10:
739         output_fcmp(ctx, "fcmp_cne_", suffix);
740         break;
741     case 0x11:
742         output_fcmp(ctx, "fcmp_sne_", suffix);
743         break;
744     case 0x14:
745         output_fcmp(ctx, "fcmp_cor_", suffix);
746         break;
747     case 0x15:
748         output_fcmp(ctx, "fcmp_sor_", suffix);
749         break;
750     case 0x18:
751         output_fcmp(ctx, "fcmp_cune_", suffix);
752         break;
753     case 0x19:
754         output_fcmp(ctx, "fcmp_sune_", suffix);
755         break;
756     default:
757         ret = false;
758     }
759     return ret;
760 }
761 
762 #define FCMP_INSN(suffix)                               \
763 static bool trans_fcmp_cond_##suffix(DisasContext *ctx, \
764                                      arg_cff_fcond * a) \
765 {                                                       \
766     return output_cff_fcond(ctx, a, #suffix);           \
767 }
768 
769 FCMP_INSN(s)
770 FCMP_INSN(d)
771 
772 #define PCADD_INSN(name)                                        \
773 static bool trans_##name(DisasContext *ctx, arg_##name *a)      \
774 {                                                               \
775     output(ctx, #name, "r%d, %d # 0x%" PRIx64,                  \
776            a->rd, a->imm, gen_##name(ctx->pc, a->imm));         \
777     return true;                                                \
778 }
779 
780 static uint64_t gen_pcaddi(uint64_t pc, int imm)
781 {
782     return pc + (imm << 2);
783 }
784 
785 static uint64_t gen_pcalau12i(uint64_t pc, int imm)
786 {
787     return (pc + (imm << 12)) & ~0xfff;
788 }
789 
790 static uint64_t gen_pcaddu12i(uint64_t pc, int imm)
791 {
792     return pc + (imm << 12);
793 }
794 
795 static uint64_t gen_pcaddu18i(uint64_t pc, int imm)
796 {
797     return pc + ((uint64_t)(imm) << 18);
798 }
799 
800 PCADD_INSN(pcaddi)
801 PCADD_INSN(pcalau12i)
802 PCADD_INSN(pcaddu12i)
803 PCADD_INSN(pcaddu18i)
804 
805 #define INSN_LSX(insn, type)                                \
806 static bool trans_##insn(DisasContext *ctx, arg_##type * a) \
807 {                                                           \
808     output_##type(ctx, a, #insn);                           \
809     return true;                                            \
810 }
811 
812 static void output_cv(DisasContext *ctx, arg_cv *a,
813                         const char *mnemonic)
814 {
815     output(ctx, mnemonic, "fcc%d, v%d", a->cd, a->vj);
816 }
817 
818 static void output_vvv(DisasContext *ctx, arg_vvv *a, const char *mnemonic)
819 {
820     output(ctx, mnemonic, "v%d, v%d, v%d", a->vd, a->vj, a->vk);
821 }
822 
823 static void output_vv_i(DisasContext *ctx, arg_vv_i *a, const char *mnemonic)
824 {
825     output(ctx, mnemonic, "v%d, v%d, 0x%x", a->vd, a->vj, a->imm);
826 }
827 
828 static void output_vv(DisasContext *ctx, arg_vv *a, const char *mnemonic)
829 {
830     output(ctx, mnemonic, "v%d, v%d", a->vd, a->vj);
831 }
832 
833 static void output_vvvv(DisasContext *ctx, arg_vvvv *a, const char *mnemonic)
834 {
835     output(ctx, mnemonic, "v%d, v%d, v%d, v%d", a->vd, a->vj, a->vk, a->va);
836 }
837 
838 static void output_vr_i(DisasContext *ctx, arg_vr_i *a, const char *mnemonic)
839 {
840     output(ctx, mnemonic, "v%d, r%d, 0x%x", a->vd, a->rj, a->imm);
841 }
842 
843 static void output_vr_ii(DisasContext *ctx, arg_vr_ii *a, const char *mnemonic)
844 {
845     output(ctx, mnemonic, "v%d, r%d, 0x%x, 0x%x", a->vd, a->rj, a->imm, a->imm2);
846 }
847 
848 static void output_rv_i(DisasContext *ctx, arg_rv_i *a, const char *mnemonic)
849 {
850     output(ctx, mnemonic, "r%d, v%d, 0x%x", a->rd, a->vj,  a->imm);
851 }
852 
853 static void output_vr(DisasContext *ctx, arg_vr *a, const char *mnemonic)
854 {
855     output(ctx, mnemonic, "v%d, r%d", a->vd, a->rj);
856 }
857 
858 static void output_vvr(DisasContext *ctx, arg_vvr *a, const char *mnemonic)
859 {
860     output(ctx, mnemonic, "v%d, v%d, r%d", a->vd, a->vj, a->rk);
861 }
862 
863 static void output_vrr(DisasContext *ctx, arg_vrr *a, const char *mnemonic)
864 {
865     output(ctx, mnemonic, "v%d, r%d, r%d", a->vd, a->rj, a->rk);
866 }
867 
868 static void output_v_i(DisasContext *ctx, arg_v_i *a, const char *mnemonic)
869 {
870     output(ctx, mnemonic, "v%d, 0x%x", a->vd, a->imm);
871 }
872 
873 INSN_LSX(vadd_b,           vvv)
874 INSN_LSX(vadd_h,           vvv)
875 INSN_LSX(vadd_w,           vvv)
876 INSN_LSX(vadd_d,           vvv)
877 INSN_LSX(vadd_q,           vvv)
878 INSN_LSX(vsub_b,           vvv)
879 INSN_LSX(vsub_h,           vvv)
880 INSN_LSX(vsub_w,           vvv)
881 INSN_LSX(vsub_d,           vvv)
882 INSN_LSX(vsub_q,           vvv)
883 
884 INSN_LSX(vaddi_bu,         vv_i)
885 INSN_LSX(vaddi_hu,         vv_i)
886 INSN_LSX(vaddi_wu,         vv_i)
887 INSN_LSX(vaddi_du,         vv_i)
888 INSN_LSX(vsubi_bu,         vv_i)
889 INSN_LSX(vsubi_hu,         vv_i)
890 INSN_LSX(vsubi_wu,         vv_i)
891 INSN_LSX(vsubi_du,         vv_i)
892 
893 INSN_LSX(vneg_b,           vv)
894 INSN_LSX(vneg_h,           vv)
895 INSN_LSX(vneg_w,           vv)
896 INSN_LSX(vneg_d,           vv)
897 
898 INSN_LSX(vsadd_b,          vvv)
899 INSN_LSX(vsadd_h,          vvv)
900 INSN_LSX(vsadd_w,          vvv)
901 INSN_LSX(vsadd_d,          vvv)
902 INSN_LSX(vsadd_bu,         vvv)
903 INSN_LSX(vsadd_hu,         vvv)
904 INSN_LSX(vsadd_wu,         vvv)
905 INSN_LSX(vsadd_du,         vvv)
906 INSN_LSX(vssub_b,          vvv)
907 INSN_LSX(vssub_h,          vvv)
908 INSN_LSX(vssub_w,          vvv)
909 INSN_LSX(vssub_d,          vvv)
910 INSN_LSX(vssub_bu,         vvv)
911 INSN_LSX(vssub_hu,         vvv)
912 INSN_LSX(vssub_wu,         vvv)
913 INSN_LSX(vssub_du,         vvv)
914 
915 INSN_LSX(vhaddw_h_b,       vvv)
916 INSN_LSX(vhaddw_w_h,       vvv)
917 INSN_LSX(vhaddw_d_w,       vvv)
918 INSN_LSX(vhaddw_q_d,       vvv)
919 INSN_LSX(vhaddw_hu_bu,     vvv)
920 INSN_LSX(vhaddw_wu_hu,     vvv)
921 INSN_LSX(vhaddw_du_wu,     vvv)
922 INSN_LSX(vhaddw_qu_du,     vvv)
923 INSN_LSX(vhsubw_h_b,       vvv)
924 INSN_LSX(vhsubw_w_h,       vvv)
925 INSN_LSX(vhsubw_d_w,       vvv)
926 INSN_LSX(vhsubw_q_d,       vvv)
927 INSN_LSX(vhsubw_hu_bu,     vvv)
928 INSN_LSX(vhsubw_wu_hu,     vvv)
929 INSN_LSX(vhsubw_du_wu,     vvv)
930 INSN_LSX(vhsubw_qu_du,     vvv)
931 
932 INSN_LSX(vaddwev_h_b,      vvv)
933 INSN_LSX(vaddwev_w_h,      vvv)
934 INSN_LSX(vaddwev_d_w,      vvv)
935 INSN_LSX(vaddwev_q_d,      vvv)
936 INSN_LSX(vaddwod_h_b,      vvv)
937 INSN_LSX(vaddwod_w_h,      vvv)
938 INSN_LSX(vaddwod_d_w,      vvv)
939 INSN_LSX(vaddwod_q_d,      vvv)
940 INSN_LSX(vsubwev_h_b,      vvv)
941 INSN_LSX(vsubwev_w_h,      vvv)
942 INSN_LSX(vsubwev_d_w,      vvv)
943 INSN_LSX(vsubwev_q_d,      vvv)
944 INSN_LSX(vsubwod_h_b,      vvv)
945 INSN_LSX(vsubwod_w_h,      vvv)
946 INSN_LSX(vsubwod_d_w,      vvv)
947 INSN_LSX(vsubwod_q_d,      vvv)
948 
949 INSN_LSX(vaddwev_h_bu,     vvv)
950 INSN_LSX(vaddwev_w_hu,     vvv)
951 INSN_LSX(vaddwev_d_wu,     vvv)
952 INSN_LSX(vaddwev_q_du,     vvv)
953 INSN_LSX(vaddwod_h_bu,     vvv)
954 INSN_LSX(vaddwod_w_hu,     vvv)
955 INSN_LSX(vaddwod_d_wu,     vvv)
956 INSN_LSX(vaddwod_q_du,     vvv)
957 INSN_LSX(vsubwev_h_bu,     vvv)
958 INSN_LSX(vsubwev_w_hu,     vvv)
959 INSN_LSX(vsubwev_d_wu,     vvv)
960 INSN_LSX(vsubwev_q_du,     vvv)
961 INSN_LSX(vsubwod_h_bu,     vvv)
962 INSN_LSX(vsubwod_w_hu,     vvv)
963 INSN_LSX(vsubwod_d_wu,     vvv)
964 INSN_LSX(vsubwod_q_du,     vvv)
965 
966 INSN_LSX(vaddwev_h_bu_b,   vvv)
967 INSN_LSX(vaddwev_w_hu_h,   vvv)
968 INSN_LSX(vaddwev_d_wu_w,   vvv)
969 INSN_LSX(vaddwev_q_du_d,   vvv)
970 INSN_LSX(vaddwod_h_bu_b,   vvv)
971 INSN_LSX(vaddwod_w_hu_h,   vvv)
972 INSN_LSX(vaddwod_d_wu_w,   vvv)
973 INSN_LSX(vaddwod_q_du_d,   vvv)
974 
975 INSN_LSX(vavg_b,           vvv)
976 INSN_LSX(vavg_h,           vvv)
977 INSN_LSX(vavg_w,           vvv)
978 INSN_LSX(vavg_d,           vvv)
979 INSN_LSX(vavg_bu,          vvv)
980 INSN_LSX(vavg_hu,          vvv)
981 INSN_LSX(vavg_wu,          vvv)
982 INSN_LSX(vavg_du,          vvv)
983 INSN_LSX(vavgr_b,          vvv)
984 INSN_LSX(vavgr_h,          vvv)
985 INSN_LSX(vavgr_w,          vvv)
986 INSN_LSX(vavgr_d,          vvv)
987 INSN_LSX(vavgr_bu,         vvv)
988 INSN_LSX(vavgr_hu,         vvv)
989 INSN_LSX(vavgr_wu,         vvv)
990 INSN_LSX(vavgr_du,         vvv)
991 
992 INSN_LSX(vabsd_b,          vvv)
993 INSN_LSX(vabsd_h,          vvv)
994 INSN_LSX(vabsd_w,          vvv)
995 INSN_LSX(vabsd_d,          vvv)
996 INSN_LSX(vabsd_bu,         vvv)
997 INSN_LSX(vabsd_hu,         vvv)
998 INSN_LSX(vabsd_wu,         vvv)
999 INSN_LSX(vabsd_du,         vvv)
1000 
1001 INSN_LSX(vadda_b,          vvv)
1002 INSN_LSX(vadda_h,          vvv)
1003 INSN_LSX(vadda_w,          vvv)
1004 INSN_LSX(vadda_d,          vvv)
1005 
1006 INSN_LSX(vmax_b,           vvv)
1007 INSN_LSX(vmax_h,           vvv)
1008 INSN_LSX(vmax_w,           vvv)
1009 INSN_LSX(vmax_d,           vvv)
1010 INSN_LSX(vmin_b,           vvv)
1011 INSN_LSX(vmin_h,           vvv)
1012 INSN_LSX(vmin_w,           vvv)
1013 INSN_LSX(vmin_d,           vvv)
1014 INSN_LSX(vmax_bu,          vvv)
1015 INSN_LSX(vmax_hu,          vvv)
1016 INSN_LSX(vmax_wu,          vvv)
1017 INSN_LSX(vmax_du,          vvv)
1018 INSN_LSX(vmin_bu,          vvv)
1019 INSN_LSX(vmin_hu,          vvv)
1020 INSN_LSX(vmin_wu,          vvv)
1021 INSN_LSX(vmin_du,          vvv)
1022 INSN_LSX(vmaxi_b,          vv_i)
1023 INSN_LSX(vmaxi_h,          vv_i)
1024 INSN_LSX(vmaxi_w,          vv_i)
1025 INSN_LSX(vmaxi_d,          vv_i)
1026 INSN_LSX(vmini_b,          vv_i)
1027 INSN_LSX(vmini_h,          vv_i)
1028 INSN_LSX(vmini_w,          vv_i)
1029 INSN_LSX(vmini_d,          vv_i)
1030 INSN_LSX(vmaxi_bu,         vv_i)
1031 INSN_LSX(vmaxi_hu,         vv_i)
1032 INSN_LSX(vmaxi_wu,         vv_i)
1033 INSN_LSX(vmaxi_du,         vv_i)
1034 INSN_LSX(vmini_bu,         vv_i)
1035 INSN_LSX(vmini_hu,         vv_i)
1036 INSN_LSX(vmini_wu,         vv_i)
1037 INSN_LSX(vmini_du,         vv_i)
1038 
1039 INSN_LSX(vmul_b,           vvv)
1040 INSN_LSX(vmul_h,           vvv)
1041 INSN_LSX(vmul_w,           vvv)
1042 INSN_LSX(vmul_d,           vvv)
1043 INSN_LSX(vmuh_b,           vvv)
1044 INSN_LSX(vmuh_h,           vvv)
1045 INSN_LSX(vmuh_w,           vvv)
1046 INSN_LSX(vmuh_d,           vvv)
1047 INSN_LSX(vmuh_bu,          vvv)
1048 INSN_LSX(vmuh_hu,          vvv)
1049 INSN_LSX(vmuh_wu,          vvv)
1050 INSN_LSX(vmuh_du,          vvv)
1051 
1052 INSN_LSX(vmulwev_h_b,      vvv)
1053 INSN_LSX(vmulwev_w_h,      vvv)
1054 INSN_LSX(vmulwev_d_w,      vvv)
1055 INSN_LSX(vmulwev_q_d,      vvv)
1056 INSN_LSX(vmulwod_h_b,      vvv)
1057 INSN_LSX(vmulwod_w_h,      vvv)
1058 INSN_LSX(vmulwod_d_w,      vvv)
1059 INSN_LSX(vmulwod_q_d,      vvv)
1060 INSN_LSX(vmulwev_h_bu,     vvv)
1061 INSN_LSX(vmulwev_w_hu,     vvv)
1062 INSN_LSX(vmulwev_d_wu,     vvv)
1063 INSN_LSX(vmulwev_q_du,     vvv)
1064 INSN_LSX(vmulwod_h_bu,     vvv)
1065 INSN_LSX(vmulwod_w_hu,     vvv)
1066 INSN_LSX(vmulwod_d_wu,     vvv)
1067 INSN_LSX(vmulwod_q_du,     vvv)
1068 INSN_LSX(vmulwev_h_bu_b,   vvv)
1069 INSN_LSX(vmulwev_w_hu_h,   vvv)
1070 INSN_LSX(vmulwev_d_wu_w,   vvv)
1071 INSN_LSX(vmulwev_q_du_d,   vvv)
1072 INSN_LSX(vmulwod_h_bu_b,   vvv)
1073 INSN_LSX(vmulwod_w_hu_h,   vvv)
1074 INSN_LSX(vmulwod_d_wu_w,   vvv)
1075 INSN_LSX(vmulwod_q_du_d,   vvv)
1076 
1077 INSN_LSX(vmadd_b,          vvv)
1078 INSN_LSX(vmadd_h,          vvv)
1079 INSN_LSX(vmadd_w,          vvv)
1080 INSN_LSX(vmadd_d,          vvv)
1081 INSN_LSX(vmsub_b,          vvv)
1082 INSN_LSX(vmsub_h,          vvv)
1083 INSN_LSX(vmsub_w,          vvv)
1084 INSN_LSX(vmsub_d,          vvv)
1085 
1086 INSN_LSX(vmaddwev_h_b,     vvv)
1087 INSN_LSX(vmaddwev_w_h,     vvv)
1088 INSN_LSX(vmaddwev_d_w,     vvv)
1089 INSN_LSX(vmaddwev_q_d,     vvv)
1090 INSN_LSX(vmaddwod_h_b,     vvv)
1091 INSN_LSX(vmaddwod_w_h,     vvv)
1092 INSN_LSX(vmaddwod_d_w,     vvv)
1093 INSN_LSX(vmaddwod_q_d,     vvv)
1094 INSN_LSX(vmaddwev_h_bu,    vvv)
1095 INSN_LSX(vmaddwev_w_hu,    vvv)
1096 INSN_LSX(vmaddwev_d_wu,    vvv)
1097 INSN_LSX(vmaddwev_q_du,    vvv)
1098 INSN_LSX(vmaddwod_h_bu,    vvv)
1099 INSN_LSX(vmaddwod_w_hu,    vvv)
1100 INSN_LSX(vmaddwod_d_wu,    vvv)
1101 INSN_LSX(vmaddwod_q_du,    vvv)
1102 INSN_LSX(vmaddwev_h_bu_b,  vvv)
1103 INSN_LSX(vmaddwev_w_hu_h,  vvv)
1104 INSN_LSX(vmaddwev_d_wu_w,  vvv)
1105 INSN_LSX(vmaddwev_q_du_d,  vvv)
1106 INSN_LSX(vmaddwod_h_bu_b,  vvv)
1107 INSN_LSX(vmaddwod_w_hu_h,  vvv)
1108 INSN_LSX(vmaddwod_d_wu_w,  vvv)
1109 INSN_LSX(vmaddwod_q_du_d,  vvv)
1110 
1111 INSN_LSX(vdiv_b,           vvv)
1112 INSN_LSX(vdiv_h,           vvv)
1113 INSN_LSX(vdiv_w,           vvv)
1114 INSN_LSX(vdiv_d,           vvv)
1115 INSN_LSX(vdiv_bu,          vvv)
1116 INSN_LSX(vdiv_hu,          vvv)
1117 INSN_LSX(vdiv_wu,          vvv)
1118 INSN_LSX(vdiv_du,          vvv)
1119 INSN_LSX(vmod_b,           vvv)
1120 INSN_LSX(vmod_h,           vvv)
1121 INSN_LSX(vmod_w,           vvv)
1122 INSN_LSX(vmod_d,           vvv)
1123 INSN_LSX(vmod_bu,          vvv)
1124 INSN_LSX(vmod_hu,          vvv)
1125 INSN_LSX(vmod_wu,          vvv)
1126 INSN_LSX(vmod_du,          vvv)
1127 
1128 INSN_LSX(vsat_b,           vv_i)
1129 INSN_LSX(vsat_h,           vv_i)
1130 INSN_LSX(vsat_w,           vv_i)
1131 INSN_LSX(vsat_d,           vv_i)
1132 INSN_LSX(vsat_bu,          vv_i)
1133 INSN_LSX(vsat_hu,          vv_i)
1134 INSN_LSX(vsat_wu,          vv_i)
1135 INSN_LSX(vsat_du,          vv_i)
1136 
1137 INSN_LSX(vexth_h_b,        vv)
1138 INSN_LSX(vexth_w_h,        vv)
1139 INSN_LSX(vexth_d_w,        vv)
1140 INSN_LSX(vexth_q_d,        vv)
1141 INSN_LSX(vexth_hu_bu,      vv)
1142 INSN_LSX(vexth_wu_hu,      vv)
1143 INSN_LSX(vexth_du_wu,      vv)
1144 INSN_LSX(vexth_qu_du,      vv)
1145 
1146 INSN_LSX(vsigncov_b,       vvv)
1147 INSN_LSX(vsigncov_h,       vvv)
1148 INSN_LSX(vsigncov_w,       vvv)
1149 INSN_LSX(vsigncov_d,       vvv)
1150 
1151 INSN_LSX(vmskltz_b,        vv)
1152 INSN_LSX(vmskltz_h,        vv)
1153 INSN_LSX(vmskltz_w,        vv)
1154 INSN_LSX(vmskltz_d,        vv)
1155 INSN_LSX(vmskgez_b,        vv)
1156 INSN_LSX(vmsknz_b,         vv)
1157 
1158 INSN_LSX(vldi,             v_i)
1159 
1160 INSN_LSX(vand_v,           vvv)
1161 INSN_LSX(vor_v,            vvv)
1162 INSN_LSX(vxor_v,           vvv)
1163 INSN_LSX(vnor_v,           vvv)
1164 INSN_LSX(vandn_v,          vvv)
1165 INSN_LSX(vorn_v,           vvv)
1166 
1167 INSN_LSX(vandi_b,          vv_i)
1168 INSN_LSX(vori_b,           vv_i)
1169 INSN_LSX(vxori_b,          vv_i)
1170 INSN_LSX(vnori_b,          vv_i)
1171 
1172 INSN_LSX(vsll_b,           vvv)
1173 INSN_LSX(vsll_h,           vvv)
1174 INSN_LSX(vsll_w,           vvv)
1175 INSN_LSX(vsll_d,           vvv)
1176 INSN_LSX(vslli_b,          vv_i)
1177 INSN_LSX(vslli_h,          vv_i)
1178 INSN_LSX(vslli_w,          vv_i)
1179 INSN_LSX(vslli_d,          vv_i)
1180 
1181 INSN_LSX(vsrl_b,           vvv)
1182 INSN_LSX(vsrl_h,           vvv)
1183 INSN_LSX(vsrl_w,           vvv)
1184 INSN_LSX(vsrl_d,           vvv)
1185 INSN_LSX(vsrli_b,          vv_i)
1186 INSN_LSX(vsrli_h,          vv_i)
1187 INSN_LSX(vsrli_w,          vv_i)
1188 INSN_LSX(vsrli_d,          vv_i)
1189 
1190 INSN_LSX(vsra_b,           vvv)
1191 INSN_LSX(vsra_h,           vvv)
1192 INSN_LSX(vsra_w,           vvv)
1193 INSN_LSX(vsra_d,           vvv)
1194 INSN_LSX(vsrai_b,          vv_i)
1195 INSN_LSX(vsrai_h,          vv_i)
1196 INSN_LSX(vsrai_w,          vv_i)
1197 INSN_LSX(vsrai_d,          vv_i)
1198 
1199 INSN_LSX(vrotr_b,          vvv)
1200 INSN_LSX(vrotr_h,          vvv)
1201 INSN_LSX(vrotr_w,          vvv)
1202 INSN_LSX(vrotr_d,          vvv)
1203 INSN_LSX(vrotri_b,         vv_i)
1204 INSN_LSX(vrotri_h,         vv_i)
1205 INSN_LSX(vrotri_w,         vv_i)
1206 INSN_LSX(vrotri_d,         vv_i)
1207 
1208 INSN_LSX(vsllwil_h_b,      vv_i)
1209 INSN_LSX(vsllwil_w_h,      vv_i)
1210 INSN_LSX(vsllwil_d_w,      vv_i)
1211 INSN_LSX(vextl_q_d,        vv)
1212 INSN_LSX(vsllwil_hu_bu,    vv_i)
1213 INSN_LSX(vsllwil_wu_hu,    vv_i)
1214 INSN_LSX(vsllwil_du_wu,    vv_i)
1215 INSN_LSX(vextl_qu_du,      vv)
1216 
1217 INSN_LSX(vsrlr_b,          vvv)
1218 INSN_LSX(vsrlr_h,          vvv)
1219 INSN_LSX(vsrlr_w,          vvv)
1220 INSN_LSX(vsrlr_d,          vvv)
1221 INSN_LSX(vsrlri_b,         vv_i)
1222 INSN_LSX(vsrlri_h,         vv_i)
1223 INSN_LSX(vsrlri_w,         vv_i)
1224 INSN_LSX(vsrlri_d,         vv_i)
1225 
1226 INSN_LSX(vsrar_b,          vvv)
1227 INSN_LSX(vsrar_h,          vvv)
1228 INSN_LSX(vsrar_w,          vvv)
1229 INSN_LSX(vsrar_d,          vvv)
1230 INSN_LSX(vsrari_b,         vv_i)
1231 INSN_LSX(vsrari_h,         vv_i)
1232 INSN_LSX(vsrari_w,         vv_i)
1233 INSN_LSX(vsrari_d,         vv_i)
1234 
1235 INSN_LSX(vsrln_b_h,       vvv)
1236 INSN_LSX(vsrln_h_w,       vvv)
1237 INSN_LSX(vsrln_w_d,       vvv)
1238 INSN_LSX(vsran_b_h,       vvv)
1239 INSN_LSX(vsran_h_w,       vvv)
1240 INSN_LSX(vsran_w_d,       vvv)
1241 
1242 INSN_LSX(vsrlni_b_h,       vv_i)
1243 INSN_LSX(vsrlni_h_w,       vv_i)
1244 INSN_LSX(vsrlni_w_d,       vv_i)
1245 INSN_LSX(vsrlni_d_q,       vv_i)
1246 INSN_LSX(vsrani_b_h,       vv_i)
1247 INSN_LSX(vsrani_h_w,       vv_i)
1248 INSN_LSX(vsrani_w_d,       vv_i)
1249 INSN_LSX(vsrani_d_q,       vv_i)
1250 
1251 INSN_LSX(vsrlrn_b_h,       vvv)
1252 INSN_LSX(vsrlrn_h_w,       vvv)
1253 INSN_LSX(vsrlrn_w_d,       vvv)
1254 INSN_LSX(vsrarn_b_h,       vvv)
1255 INSN_LSX(vsrarn_h_w,       vvv)
1256 INSN_LSX(vsrarn_w_d,       vvv)
1257 
1258 INSN_LSX(vsrlrni_b_h,      vv_i)
1259 INSN_LSX(vsrlrni_h_w,      vv_i)
1260 INSN_LSX(vsrlrni_w_d,      vv_i)
1261 INSN_LSX(vsrlrni_d_q,      vv_i)
1262 INSN_LSX(vsrarni_b_h,      vv_i)
1263 INSN_LSX(vsrarni_h_w,      vv_i)
1264 INSN_LSX(vsrarni_w_d,      vv_i)
1265 INSN_LSX(vsrarni_d_q,      vv_i)
1266 
1267 INSN_LSX(vssrln_b_h,       vvv)
1268 INSN_LSX(vssrln_h_w,       vvv)
1269 INSN_LSX(vssrln_w_d,       vvv)
1270 INSN_LSX(vssran_b_h,       vvv)
1271 INSN_LSX(vssran_h_w,       vvv)
1272 INSN_LSX(vssran_w_d,       vvv)
1273 INSN_LSX(vssrln_bu_h,      vvv)
1274 INSN_LSX(vssrln_hu_w,      vvv)
1275 INSN_LSX(vssrln_wu_d,      vvv)
1276 INSN_LSX(vssran_bu_h,      vvv)
1277 INSN_LSX(vssran_hu_w,      vvv)
1278 INSN_LSX(vssran_wu_d,      vvv)
1279 
1280 INSN_LSX(vssrlni_b_h,      vv_i)
1281 INSN_LSX(vssrlni_h_w,      vv_i)
1282 INSN_LSX(vssrlni_w_d,      vv_i)
1283 INSN_LSX(vssrlni_d_q,      vv_i)
1284 INSN_LSX(vssrani_b_h,      vv_i)
1285 INSN_LSX(vssrani_h_w,      vv_i)
1286 INSN_LSX(vssrani_w_d,      vv_i)
1287 INSN_LSX(vssrani_d_q,      vv_i)
1288 INSN_LSX(vssrlni_bu_h,     vv_i)
1289 INSN_LSX(vssrlni_hu_w,     vv_i)
1290 INSN_LSX(vssrlni_wu_d,     vv_i)
1291 INSN_LSX(vssrlni_du_q,     vv_i)
1292 INSN_LSX(vssrani_bu_h,     vv_i)
1293 INSN_LSX(vssrani_hu_w,     vv_i)
1294 INSN_LSX(vssrani_wu_d,     vv_i)
1295 INSN_LSX(vssrani_du_q,     vv_i)
1296 
1297 INSN_LSX(vssrlrn_b_h,      vvv)
1298 INSN_LSX(vssrlrn_h_w,      vvv)
1299 INSN_LSX(vssrlrn_w_d,      vvv)
1300 INSN_LSX(vssrarn_b_h,      vvv)
1301 INSN_LSX(vssrarn_h_w,      vvv)
1302 INSN_LSX(vssrarn_w_d,      vvv)
1303 INSN_LSX(vssrlrn_bu_h,     vvv)
1304 INSN_LSX(vssrlrn_hu_w,     vvv)
1305 INSN_LSX(vssrlrn_wu_d,     vvv)
1306 INSN_LSX(vssrarn_bu_h,     vvv)
1307 INSN_LSX(vssrarn_hu_w,     vvv)
1308 INSN_LSX(vssrarn_wu_d,     vvv)
1309 
1310 INSN_LSX(vssrlrni_b_h,     vv_i)
1311 INSN_LSX(vssrlrni_h_w,     vv_i)
1312 INSN_LSX(vssrlrni_w_d,     vv_i)
1313 INSN_LSX(vssrlrni_d_q,     vv_i)
1314 INSN_LSX(vssrlrni_bu_h,    vv_i)
1315 INSN_LSX(vssrlrni_hu_w,    vv_i)
1316 INSN_LSX(vssrlrni_wu_d,    vv_i)
1317 INSN_LSX(vssrlrni_du_q,    vv_i)
1318 INSN_LSX(vssrarni_b_h,     vv_i)
1319 INSN_LSX(vssrarni_h_w,     vv_i)
1320 INSN_LSX(vssrarni_w_d,     vv_i)
1321 INSN_LSX(vssrarni_d_q,     vv_i)
1322 INSN_LSX(vssrarni_bu_h,    vv_i)
1323 INSN_LSX(vssrarni_hu_w,    vv_i)
1324 INSN_LSX(vssrarni_wu_d,    vv_i)
1325 INSN_LSX(vssrarni_du_q,    vv_i)
1326 
1327 INSN_LSX(vclo_b,           vv)
1328 INSN_LSX(vclo_h,           vv)
1329 INSN_LSX(vclo_w,           vv)
1330 INSN_LSX(vclo_d,           vv)
1331 INSN_LSX(vclz_b,           vv)
1332 INSN_LSX(vclz_h,           vv)
1333 INSN_LSX(vclz_w,           vv)
1334 INSN_LSX(vclz_d,           vv)
1335 
1336 INSN_LSX(vpcnt_b,          vv)
1337 INSN_LSX(vpcnt_h,          vv)
1338 INSN_LSX(vpcnt_w,          vv)
1339 INSN_LSX(vpcnt_d,          vv)
1340 
1341 INSN_LSX(vbitclr_b,        vvv)
1342 INSN_LSX(vbitclr_h,        vvv)
1343 INSN_LSX(vbitclr_w,        vvv)
1344 INSN_LSX(vbitclr_d,        vvv)
1345 INSN_LSX(vbitclri_b,       vv_i)
1346 INSN_LSX(vbitclri_h,       vv_i)
1347 INSN_LSX(vbitclri_w,       vv_i)
1348 INSN_LSX(vbitclri_d,       vv_i)
1349 INSN_LSX(vbitset_b,        vvv)
1350 INSN_LSX(vbitset_h,        vvv)
1351 INSN_LSX(vbitset_w,        vvv)
1352 INSN_LSX(vbitset_d,        vvv)
1353 INSN_LSX(vbitseti_b,       vv_i)
1354 INSN_LSX(vbitseti_h,       vv_i)
1355 INSN_LSX(vbitseti_w,       vv_i)
1356 INSN_LSX(vbitseti_d,       vv_i)
1357 INSN_LSX(vbitrev_b,        vvv)
1358 INSN_LSX(vbitrev_h,        vvv)
1359 INSN_LSX(vbitrev_w,        vvv)
1360 INSN_LSX(vbitrev_d,        vvv)
1361 INSN_LSX(vbitrevi_b,       vv_i)
1362 INSN_LSX(vbitrevi_h,       vv_i)
1363 INSN_LSX(vbitrevi_w,       vv_i)
1364 INSN_LSX(vbitrevi_d,       vv_i)
1365 
1366 INSN_LSX(vfrstp_b,         vvv)
1367 INSN_LSX(vfrstp_h,         vvv)
1368 INSN_LSX(vfrstpi_b,        vv_i)
1369 INSN_LSX(vfrstpi_h,        vv_i)
1370 
1371 INSN_LSX(vfadd_s,          vvv)
1372 INSN_LSX(vfadd_d,          vvv)
1373 INSN_LSX(vfsub_s,          vvv)
1374 INSN_LSX(vfsub_d,          vvv)
1375 INSN_LSX(vfmul_s,          vvv)
1376 INSN_LSX(vfmul_d,          vvv)
1377 INSN_LSX(vfdiv_s,          vvv)
1378 INSN_LSX(vfdiv_d,          vvv)
1379 
1380 INSN_LSX(vfmadd_s,         vvvv)
1381 INSN_LSX(vfmadd_d,         vvvv)
1382 INSN_LSX(vfmsub_s,         vvvv)
1383 INSN_LSX(vfmsub_d,         vvvv)
1384 INSN_LSX(vfnmadd_s,        vvvv)
1385 INSN_LSX(vfnmadd_d,        vvvv)
1386 INSN_LSX(vfnmsub_s,        vvvv)
1387 INSN_LSX(vfnmsub_d,        vvvv)
1388 
1389 INSN_LSX(vfmax_s,          vvv)
1390 INSN_LSX(vfmax_d,          vvv)
1391 INSN_LSX(vfmin_s,          vvv)
1392 INSN_LSX(vfmin_d,          vvv)
1393 
1394 INSN_LSX(vfmaxa_s,         vvv)
1395 INSN_LSX(vfmaxa_d,         vvv)
1396 INSN_LSX(vfmina_s,         vvv)
1397 INSN_LSX(vfmina_d,         vvv)
1398 
1399 INSN_LSX(vflogb_s,         vv)
1400 INSN_LSX(vflogb_d,         vv)
1401 
1402 INSN_LSX(vfclass_s,        vv)
1403 INSN_LSX(vfclass_d,        vv)
1404 
1405 INSN_LSX(vfsqrt_s,         vv)
1406 INSN_LSX(vfsqrt_d,         vv)
1407 INSN_LSX(vfrecip_s,        vv)
1408 INSN_LSX(vfrecip_d,        vv)
1409 INSN_LSX(vfrsqrt_s,        vv)
1410 INSN_LSX(vfrsqrt_d,        vv)
1411 
1412 INSN_LSX(vfcvtl_s_h,       vv)
1413 INSN_LSX(vfcvth_s_h,       vv)
1414 INSN_LSX(vfcvtl_d_s,       vv)
1415 INSN_LSX(vfcvth_d_s,       vv)
1416 INSN_LSX(vfcvt_h_s,        vvv)
1417 INSN_LSX(vfcvt_s_d,        vvv)
1418 
1419 INSN_LSX(vfrint_s,         vv)
1420 INSN_LSX(vfrint_d,         vv)
1421 INSN_LSX(vfrintrm_s,       vv)
1422 INSN_LSX(vfrintrm_d,       vv)
1423 INSN_LSX(vfrintrp_s,       vv)
1424 INSN_LSX(vfrintrp_d,       vv)
1425 INSN_LSX(vfrintrz_s,       vv)
1426 INSN_LSX(vfrintrz_d,       vv)
1427 INSN_LSX(vfrintrne_s,      vv)
1428 INSN_LSX(vfrintrne_d,      vv)
1429 
1430 INSN_LSX(vftint_w_s,       vv)
1431 INSN_LSX(vftint_l_d,       vv)
1432 INSN_LSX(vftintrm_w_s,     vv)
1433 INSN_LSX(vftintrm_l_d,     vv)
1434 INSN_LSX(vftintrp_w_s,     vv)
1435 INSN_LSX(vftintrp_l_d,     vv)
1436 INSN_LSX(vftintrz_w_s,     vv)
1437 INSN_LSX(vftintrz_l_d,     vv)
1438 INSN_LSX(vftintrne_w_s,    vv)
1439 INSN_LSX(vftintrne_l_d,    vv)
1440 INSN_LSX(vftint_wu_s,      vv)
1441 INSN_LSX(vftint_lu_d,      vv)
1442 INSN_LSX(vftintrz_wu_s,    vv)
1443 INSN_LSX(vftintrz_lu_d,    vv)
1444 INSN_LSX(vftint_w_d,       vvv)
1445 INSN_LSX(vftintrm_w_d,     vvv)
1446 INSN_LSX(vftintrp_w_d,     vvv)
1447 INSN_LSX(vftintrz_w_d,     vvv)
1448 INSN_LSX(vftintrne_w_d,    vvv)
1449 INSN_LSX(vftintl_l_s,      vv)
1450 INSN_LSX(vftinth_l_s,      vv)
1451 INSN_LSX(vftintrml_l_s,    vv)
1452 INSN_LSX(vftintrmh_l_s,    vv)
1453 INSN_LSX(vftintrpl_l_s,    vv)
1454 INSN_LSX(vftintrph_l_s,    vv)
1455 INSN_LSX(vftintrzl_l_s,    vv)
1456 INSN_LSX(vftintrzh_l_s,    vv)
1457 INSN_LSX(vftintrnel_l_s,   vv)
1458 INSN_LSX(vftintrneh_l_s,   vv)
1459 
1460 INSN_LSX(vffint_s_w,       vv)
1461 INSN_LSX(vffint_s_wu,      vv)
1462 INSN_LSX(vffint_d_l,       vv)
1463 INSN_LSX(vffint_d_lu,      vv)
1464 INSN_LSX(vffintl_d_w,      vv)
1465 INSN_LSX(vffinth_d_w,      vv)
1466 INSN_LSX(vffint_s_l,       vvv)
1467 
1468 INSN_LSX(vseq_b,           vvv)
1469 INSN_LSX(vseq_h,           vvv)
1470 INSN_LSX(vseq_w,           vvv)
1471 INSN_LSX(vseq_d,           vvv)
1472 INSN_LSX(vseqi_b,          vv_i)
1473 INSN_LSX(vseqi_h,          vv_i)
1474 INSN_LSX(vseqi_w,          vv_i)
1475 INSN_LSX(vseqi_d,          vv_i)
1476 
1477 INSN_LSX(vsle_b,           vvv)
1478 INSN_LSX(vsle_h,           vvv)
1479 INSN_LSX(vsle_w,           vvv)
1480 INSN_LSX(vsle_d,           vvv)
1481 INSN_LSX(vslei_b,          vv_i)
1482 INSN_LSX(vslei_h,          vv_i)
1483 INSN_LSX(vslei_w,          vv_i)
1484 INSN_LSX(vslei_d,          vv_i)
1485 INSN_LSX(vsle_bu,          vvv)
1486 INSN_LSX(vsle_hu,          vvv)
1487 INSN_LSX(vsle_wu,          vvv)
1488 INSN_LSX(vsle_du,          vvv)
1489 INSN_LSX(vslei_bu,         vv_i)
1490 INSN_LSX(vslei_hu,         vv_i)
1491 INSN_LSX(vslei_wu,         vv_i)
1492 INSN_LSX(vslei_du,         vv_i)
1493 
1494 INSN_LSX(vslt_b,           vvv)
1495 INSN_LSX(vslt_h,           vvv)
1496 INSN_LSX(vslt_w,           vvv)
1497 INSN_LSX(vslt_d,           vvv)
1498 INSN_LSX(vslti_b,          vv_i)
1499 INSN_LSX(vslti_h,          vv_i)
1500 INSN_LSX(vslti_w,          vv_i)
1501 INSN_LSX(vslti_d,          vv_i)
1502 INSN_LSX(vslt_bu,          vvv)
1503 INSN_LSX(vslt_hu,          vvv)
1504 INSN_LSX(vslt_wu,          vvv)
1505 INSN_LSX(vslt_du,          vvv)
1506 INSN_LSX(vslti_bu,         vv_i)
1507 INSN_LSX(vslti_hu,         vv_i)
1508 INSN_LSX(vslti_wu,         vv_i)
1509 INSN_LSX(vslti_du,         vv_i)
1510 
1511 #define output_vfcmp(C, PREFIX, SUFFIX)                                     \
1512 {                                                                           \
1513     (C)->info->fprintf_func((C)->info->stream, "%08x   %s%s\t%d, f%d, f%d", \
1514                             (C)->insn, PREFIX, SUFFIX, a->vd,               \
1515                             a->vj, a->vk);                                  \
1516 }
1517 
1518 static bool output_vvv_fcond(DisasContext *ctx, arg_vvv_fcond * a,
1519                              const char *suffix)
1520 {
1521     bool ret = true;
1522     switch (a->fcond) {
1523     case 0x0:
1524         output_vfcmp(ctx, "vfcmp_caf_", suffix);
1525         break;
1526     case 0x1:
1527         output_vfcmp(ctx, "vfcmp_saf_", suffix);
1528         break;
1529     case 0x2:
1530         output_vfcmp(ctx, "vfcmp_clt_", suffix);
1531         break;
1532     case 0x3:
1533         output_vfcmp(ctx, "vfcmp_slt_", suffix);
1534         break;
1535     case 0x4:
1536         output_vfcmp(ctx, "vfcmp_ceq_", suffix);
1537         break;
1538     case 0x5:
1539         output_vfcmp(ctx, "vfcmp_seq_", suffix);
1540         break;
1541     case 0x6:
1542         output_vfcmp(ctx, "vfcmp_cle_", suffix);
1543         break;
1544     case 0x7:
1545         output_vfcmp(ctx, "vfcmp_sle_", suffix);
1546         break;
1547     case 0x8:
1548         output_vfcmp(ctx, "vfcmp_cun_", suffix);
1549         break;
1550     case 0x9:
1551         output_vfcmp(ctx, "vfcmp_sun_", suffix);
1552         break;
1553     case 0xA:
1554         output_vfcmp(ctx, "vfcmp_cult_", suffix);
1555         break;
1556     case 0xB:
1557         output_vfcmp(ctx, "vfcmp_sult_", suffix);
1558         break;
1559     case 0xC:
1560         output_vfcmp(ctx, "vfcmp_cueq_", suffix);
1561         break;
1562     case 0xD:
1563         output_vfcmp(ctx, "vfcmp_sueq_", suffix);
1564         break;
1565     case 0xE:
1566         output_vfcmp(ctx, "vfcmp_cule_", suffix);
1567         break;
1568     case 0xF:
1569         output_vfcmp(ctx, "vfcmp_sule_", suffix);
1570         break;
1571     case 0x10:
1572         output_vfcmp(ctx, "vfcmp_cne_", suffix);
1573         break;
1574     case 0x11:
1575         output_vfcmp(ctx, "vfcmp_sne_", suffix);
1576         break;
1577     case 0x14:
1578         output_vfcmp(ctx, "vfcmp_cor_", suffix);
1579         break;
1580     case 0x15:
1581         output_vfcmp(ctx, "vfcmp_sor_", suffix);
1582         break;
1583     case 0x18:
1584         output_vfcmp(ctx, "vfcmp_cune_", suffix);
1585         break;
1586     case 0x19:
1587         output_vfcmp(ctx, "vfcmp_sune_", suffix);
1588         break;
1589     default:
1590         ret = false;
1591     }
1592     return ret;
1593 }
1594 
1595 #define LSX_FCMP_INSN(suffix)                            \
1596 static bool trans_vfcmp_cond_##suffix(DisasContext *ctx, \
1597                                      arg_vvv_fcond * a)  \
1598 {                                                        \
1599     return output_vvv_fcond(ctx, a, #suffix);            \
1600 }
1601 
1602 LSX_FCMP_INSN(s)
1603 LSX_FCMP_INSN(d)
1604 
1605 INSN_LSX(vbitsel_v,        vvvv)
1606 INSN_LSX(vbitseli_b,       vv_i)
1607 
1608 INSN_LSX(vseteqz_v,        cv)
1609 INSN_LSX(vsetnez_v,        cv)
1610 INSN_LSX(vsetanyeqz_b,     cv)
1611 INSN_LSX(vsetanyeqz_h,     cv)
1612 INSN_LSX(vsetanyeqz_w,     cv)
1613 INSN_LSX(vsetanyeqz_d,     cv)
1614 INSN_LSX(vsetallnez_b,     cv)
1615 INSN_LSX(vsetallnez_h,     cv)
1616 INSN_LSX(vsetallnez_w,     cv)
1617 INSN_LSX(vsetallnez_d,     cv)
1618 
1619 INSN_LSX(vinsgr2vr_b,      vr_i)
1620 INSN_LSX(vinsgr2vr_h,      vr_i)
1621 INSN_LSX(vinsgr2vr_w,      vr_i)
1622 INSN_LSX(vinsgr2vr_d,      vr_i)
1623 INSN_LSX(vpickve2gr_b,     rv_i)
1624 INSN_LSX(vpickve2gr_h,     rv_i)
1625 INSN_LSX(vpickve2gr_w,     rv_i)
1626 INSN_LSX(vpickve2gr_d,     rv_i)
1627 INSN_LSX(vpickve2gr_bu,    rv_i)
1628 INSN_LSX(vpickve2gr_hu,    rv_i)
1629 INSN_LSX(vpickve2gr_wu,    rv_i)
1630 INSN_LSX(vpickve2gr_du,    rv_i)
1631 
1632 INSN_LSX(vreplgr2vr_b,     vr)
1633 INSN_LSX(vreplgr2vr_h,     vr)
1634 INSN_LSX(vreplgr2vr_w,     vr)
1635 INSN_LSX(vreplgr2vr_d,     vr)
1636 
1637 INSN_LSX(vreplve_b,        vvr)
1638 INSN_LSX(vreplve_h,        vvr)
1639 INSN_LSX(vreplve_w,        vvr)
1640 INSN_LSX(vreplve_d,        vvr)
1641 INSN_LSX(vreplvei_b,       vv_i)
1642 INSN_LSX(vreplvei_h,       vv_i)
1643 INSN_LSX(vreplvei_w,       vv_i)
1644 INSN_LSX(vreplvei_d,       vv_i)
1645 
1646 INSN_LSX(vbsll_v,          vv_i)
1647 INSN_LSX(vbsrl_v,          vv_i)
1648 
1649 INSN_LSX(vpackev_b,        vvv)
1650 INSN_LSX(vpackev_h,        vvv)
1651 INSN_LSX(vpackev_w,        vvv)
1652 INSN_LSX(vpackev_d,        vvv)
1653 INSN_LSX(vpackod_b,        vvv)
1654 INSN_LSX(vpackod_h,        vvv)
1655 INSN_LSX(vpackod_w,        vvv)
1656 INSN_LSX(vpackod_d,        vvv)
1657 
1658 INSN_LSX(vpickev_b,        vvv)
1659 INSN_LSX(vpickev_h,        vvv)
1660 INSN_LSX(vpickev_w,        vvv)
1661 INSN_LSX(vpickev_d,        vvv)
1662 INSN_LSX(vpickod_b,        vvv)
1663 INSN_LSX(vpickod_h,        vvv)
1664 INSN_LSX(vpickod_w,        vvv)
1665 INSN_LSX(vpickod_d,        vvv)
1666 
1667 INSN_LSX(vilvl_b,          vvv)
1668 INSN_LSX(vilvl_h,          vvv)
1669 INSN_LSX(vilvl_w,          vvv)
1670 INSN_LSX(vilvl_d,          vvv)
1671 INSN_LSX(vilvh_b,          vvv)
1672 INSN_LSX(vilvh_h,          vvv)
1673 INSN_LSX(vilvh_w,          vvv)
1674 INSN_LSX(vilvh_d,          vvv)
1675 
1676 INSN_LSX(vshuf_b,          vvvv)
1677 INSN_LSX(vshuf_h,          vvv)
1678 INSN_LSX(vshuf_w,          vvv)
1679 INSN_LSX(vshuf_d,          vvv)
1680 INSN_LSX(vshuf4i_b,        vv_i)
1681 INSN_LSX(vshuf4i_h,        vv_i)
1682 INSN_LSX(vshuf4i_w,        vv_i)
1683 INSN_LSX(vshuf4i_d,        vv_i)
1684 
1685 INSN_LSX(vpermi_w,         vv_i)
1686 
1687 INSN_LSX(vextrins_d,       vv_i)
1688 INSN_LSX(vextrins_w,       vv_i)
1689 INSN_LSX(vextrins_h,       vv_i)
1690 INSN_LSX(vextrins_b,       vv_i)
1691 
1692 INSN_LSX(vld,              vr_i)
1693 INSN_LSX(vst,              vr_i)
1694 INSN_LSX(vldx,             vrr)
1695 INSN_LSX(vstx,             vrr)
1696 
1697 INSN_LSX(vldrepl_d,        vr_i)
1698 INSN_LSX(vldrepl_w,        vr_i)
1699 INSN_LSX(vldrepl_h,        vr_i)
1700 INSN_LSX(vldrepl_b,        vr_i)
1701 INSN_LSX(vstelm_d,         vr_ii)
1702 INSN_LSX(vstelm_w,         vr_ii)
1703 INSN_LSX(vstelm_h,         vr_ii)
1704 INSN_LSX(vstelm_b,         vr_ii)
1705 
1706 #define INSN_LASX(insn, type)                               \
1707 static bool trans_##insn(DisasContext *ctx, arg_##type * a) \
1708 {                                                           \
1709     output_##type ## _x(ctx, a, #insn);                     \
1710     return true;                                            \
1711 }
1712 
1713 static void output_cv_x(DisasContext *ctx, arg_cv *a, const char *mnemonic)
1714 {
1715     output(ctx, mnemonic, "fcc%d, x%d", a->cd, a->vj);
1716 }
1717 
1718 static void output_v_i_x(DisasContext *ctx, arg_v_i *a, const char *mnemonic)
1719 {
1720     output(ctx, mnemonic, "x%d, 0x%x", a->vd, a->imm);
1721 }
1722 
1723 static void output_vvvv_x(DisasContext *ctx, arg_vvvv *a, const char *mnemonic)
1724 {
1725     output(ctx, mnemonic, "x%d, x%d, x%d, x%d", a->vd, a->vj, a->vk, a->va);
1726 }
1727 
1728 static void output_vvv_x(DisasContext *ctx, arg_vvv * a, const char *mnemonic)
1729 {
1730     output(ctx, mnemonic, "x%d, x%d, x%d", a->vd, a->vj, a->vk);
1731 }
1732 
1733 static void output_vr_x(DisasContext *ctx, arg_vr *a, const char *mnemonic)
1734 {
1735     output(ctx, mnemonic, "x%d, r%d", a->vd, a->rj);
1736 }
1737 
1738 static void output_vv_i_x(DisasContext *ctx, arg_vv_i *a, const char *mnemonic)
1739 {
1740     output(ctx, mnemonic, "x%d, x%d, 0x%x", a->vd, a->vj, a->imm);
1741 }
1742 
1743 static void output_vv_x(DisasContext *ctx, arg_vv *a, const char *mnemonic)
1744 {
1745     output(ctx, mnemonic, "x%d, x%d", a->vd, a->vj);
1746 }
1747 
1748 static void output_vr_i_x(DisasContext *ctx, arg_vr_i *a, const char *mnemonic)
1749 {
1750     output(ctx, mnemonic, "x%d, r%d, 0x%x", a->vd, a->rj, a->imm);
1751 }
1752 
1753 static void output_rv_i_x(DisasContext *ctx, arg_rv_i *a, const char *mnemonic)
1754 {
1755     output(ctx, mnemonic, "r%d, x%d, 0x%x", a->rd, a->vj, a->imm);
1756 }
1757 
1758 static void output_vvr_x(DisasContext *ctx, arg_vvr *a, const char *mnemonic)
1759 {
1760     output(ctx, mnemonic, "x%d, x%d, r%d", a->vd, a->vj, a->rk);
1761 }
1762 
1763 static void output_vrr_x(DisasContext *ctx, arg_vrr *a, const char *mnemonic)
1764 {
1765     output(ctx, mnemonic, "x%d, r%d, r%d", a->vd, a->rj, a->rk);
1766 }
1767 
1768 static void output_vr_ii_x(DisasContext *ctx, arg_vr_ii *a, const char *mnemonic)
1769 {
1770     output(ctx, mnemonic, "x%d, r%d, 0x%x, 0x%x", a->vd, a->rj, a->imm, a->imm2);
1771 }
1772 
1773 INSN_LASX(xvadd_b,           vvv)
1774 INSN_LASX(xvadd_h,           vvv)
1775 INSN_LASX(xvadd_w,           vvv)
1776 INSN_LASX(xvadd_d,           vvv)
1777 INSN_LASX(xvadd_q,           vvv)
1778 INSN_LASX(xvsub_b,           vvv)
1779 INSN_LASX(xvsub_h,           vvv)
1780 INSN_LASX(xvsub_w,           vvv)
1781 INSN_LASX(xvsub_d,           vvv)
1782 INSN_LASX(xvsub_q,           vvv)
1783 
1784 INSN_LASX(xvaddi_bu,         vv_i)
1785 INSN_LASX(xvaddi_hu,         vv_i)
1786 INSN_LASX(xvaddi_wu,         vv_i)
1787 INSN_LASX(xvaddi_du,         vv_i)
1788 INSN_LASX(xvsubi_bu,         vv_i)
1789 INSN_LASX(xvsubi_hu,         vv_i)
1790 INSN_LASX(xvsubi_wu,         vv_i)
1791 INSN_LASX(xvsubi_du,         vv_i)
1792 
1793 INSN_LASX(xvneg_b,           vv)
1794 INSN_LASX(xvneg_h,           vv)
1795 INSN_LASX(xvneg_w,           vv)
1796 INSN_LASX(xvneg_d,           vv)
1797 
1798 INSN_LASX(xvsadd_b,          vvv)
1799 INSN_LASX(xvsadd_h,          vvv)
1800 INSN_LASX(xvsadd_w,          vvv)
1801 INSN_LASX(xvsadd_d,          vvv)
1802 INSN_LASX(xvsadd_bu,         vvv)
1803 INSN_LASX(xvsadd_hu,         vvv)
1804 INSN_LASX(xvsadd_wu,         vvv)
1805 INSN_LASX(xvsadd_du,         vvv)
1806 INSN_LASX(xvssub_b,          vvv)
1807 INSN_LASX(xvssub_h,          vvv)
1808 INSN_LASX(xvssub_w,          vvv)
1809 INSN_LASX(xvssub_d,          vvv)
1810 INSN_LASX(xvssub_bu,         vvv)
1811 INSN_LASX(xvssub_hu,         vvv)
1812 INSN_LASX(xvssub_wu,         vvv)
1813 INSN_LASX(xvssub_du,         vvv)
1814 
1815 INSN_LASX(xvhaddw_h_b,       vvv)
1816 INSN_LASX(xvhaddw_w_h,       vvv)
1817 INSN_LASX(xvhaddw_d_w,       vvv)
1818 INSN_LASX(xvhaddw_q_d,       vvv)
1819 INSN_LASX(xvhaddw_hu_bu,     vvv)
1820 INSN_LASX(xvhaddw_wu_hu,     vvv)
1821 INSN_LASX(xvhaddw_du_wu,     vvv)
1822 INSN_LASX(xvhaddw_qu_du,     vvv)
1823 INSN_LASX(xvhsubw_h_b,       vvv)
1824 INSN_LASX(xvhsubw_w_h,       vvv)
1825 INSN_LASX(xvhsubw_d_w,       vvv)
1826 INSN_LASX(xvhsubw_q_d,       vvv)
1827 INSN_LASX(xvhsubw_hu_bu,     vvv)
1828 INSN_LASX(xvhsubw_wu_hu,     vvv)
1829 INSN_LASX(xvhsubw_du_wu,     vvv)
1830 INSN_LASX(xvhsubw_qu_du,     vvv)
1831 
1832 INSN_LASX(xvaddwev_h_b,      vvv)
1833 INSN_LASX(xvaddwev_w_h,      vvv)
1834 INSN_LASX(xvaddwev_d_w,      vvv)
1835 INSN_LASX(xvaddwev_q_d,      vvv)
1836 INSN_LASX(xvaddwod_h_b,      vvv)
1837 INSN_LASX(xvaddwod_w_h,      vvv)
1838 INSN_LASX(xvaddwod_d_w,      vvv)
1839 INSN_LASX(xvaddwod_q_d,      vvv)
1840 INSN_LASX(xvsubwev_h_b,      vvv)
1841 INSN_LASX(xvsubwev_w_h,      vvv)
1842 INSN_LASX(xvsubwev_d_w,      vvv)
1843 INSN_LASX(xvsubwev_q_d,      vvv)
1844 INSN_LASX(xvsubwod_h_b,      vvv)
1845 INSN_LASX(xvsubwod_w_h,      vvv)
1846 INSN_LASX(xvsubwod_d_w,      vvv)
1847 INSN_LASX(xvsubwod_q_d,      vvv)
1848 
1849 INSN_LASX(xvaddwev_h_bu,     vvv)
1850 INSN_LASX(xvaddwev_w_hu,     vvv)
1851 INSN_LASX(xvaddwev_d_wu,     vvv)
1852 INSN_LASX(xvaddwev_q_du,     vvv)
1853 INSN_LASX(xvaddwod_h_bu,     vvv)
1854 INSN_LASX(xvaddwod_w_hu,     vvv)
1855 INSN_LASX(xvaddwod_d_wu,     vvv)
1856 INSN_LASX(xvaddwod_q_du,     vvv)
1857 INSN_LASX(xvsubwev_h_bu,     vvv)
1858 INSN_LASX(xvsubwev_w_hu,     vvv)
1859 INSN_LASX(xvsubwev_d_wu,     vvv)
1860 INSN_LASX(xvsubwev_q_du,     vvv)
1861 INSN_LASX(xvsubwod_h_bu,     vvv)
1862 INSN_LASX(xvsubwod_w_hu,     vvv)
1863 INSN_LASX(xvsubwod_d_wu,     vvv)
1864 INSN_LASX(xvsubwod_q_du,     vvv)
1865 
1866 INSN_LASX(xvaddwev_h_bu_b,   vvv)
1867 INSN_LASX(xvaddwev_w_hu_h,   vvv)
1868 INSN_LASX(xvaddwev_d_wu_w,   vvv)
1869 INSN_LASX(xvaddwev_q_du_d,   vvv)
1870 INSN_LASX(xvaddwod_h_bu_b,   vvv)
1871 INSN_LASX(xvaddwod_w_hu_h,   vvv)
1872 INSN_LASX(xvaddwod_d_wu_w,   vvv)
1873 INSN_LASX(xvaddwod_q_du_d,   vvv)
1874 
1875 INSN_LASX(xvavg_b,           vvv)
1876 INSN_LASX(xvavg_h,           vvv)
1877 INSN_LASX(xvavg_w,           vvv)
1878 INSN_LASX(xvavg_d,           vvv)
1879 INSN_LASX(xvavg_bu,          vvv)
1880 INSN_LASX(xvavg_hu,          vvv)
1881 INSN_LASX(xvavg_wu,          vvv)
1882 INSN_LASX(xvavg_du,          vvv)
1883 INSN_LASX(xvavgr_b,          vvv)
1884 INSN_LASX(xvavgr_h,          vvv)
1885 INSN_LASX(xvavgr_w,          vvv)
1886 INSN_LASX(xvavgr_d,          vvv)
1887 INSN_LASX(xvavgr_bu,         vvv)
1888 INSN_LASX(xvavgr_hu,         vvv)
1889 INSN_LASX(xvavgr_wu,         vvv)
1890 INSN_LASX(xvavgr_du,         vvv)
1891 
1892 INSN_LASX(xvabsd_b,          vvv)
1893 INSN_LASX(xvabsd_h,          vvv)
1894 INSN_LASX(xvabsd_w,          vvv)
1895 INSN_LASX(xvabsd_d,          vvv)
1896 INSN_LASX(xvabsd_bu,         vvv)
1897 INSN_LASX(xvabsd_hu,         vvv)
1898 INSN_LASX(xvabsd_wu,         vvv)
1899 INSN_LASX(xvabsd_du,         vvv)
1900 
1901 INSN_LASX(xvadda_b,          vvv)
1902 INSN_LASX(xvadda_h,          vvv)
1903 INSN_LASX(xvadda_w,          vvv)
1904 INSN_LASX(xvadda_d,          vvv)
1905 
1906 INSN_LASX(xvmax_b,           vvv)
1907 INSN_LASX(xvmax_h,           vvv)
1908 INSN_LASX(xvmax_w,           vvv)
1909 INSN_LASX(xvmax_d,           vvv)
1910 INSN_LASX(xvmin_b,           vvv)
1911 INSN_LASX(xvmin_h,           vvv)
1912 INSN_LASX(xvmin_w,           vvv)
1913 INSN_LASX(xvmin_d,           vvv)
1914 INSN_LASX(xvmax_bu,          vvv)
1915 INSN_LASX(xvmax_hu,          vvv)
1916 INSN_LASX(xvmax_wu,          vvv)
1917 INSN_LASX(xvmax_du,          vvv)
1918 INSN_LASX(xvmin_bu,          vvv)
1919 INSN_LASX(xvmin_hu,          vvv)
1920 INSN_LASX(xvmin_wu,          vvv)
1921 INSN_LASX(xvmin_du,          vvv)
1922 
1923 INSN_LASX(xvmaxi_b,          vv_i)
1924 INSN_LASX(xvmaxi_h,          vv_i)
1925 INSN_LASX(xvmaxi_w,          vv_i)
1926 INSN_LASX(xvmaxi_d,          vv_i)
1927 INSN_LASX(xvmini_b,          vv_i)
1928 INSN_LASX(xvmini_h,          vv_i)
1929 INSN_LASX(xvmini_w,          vv_i)
1930 INSN_LASX(xvmini_d,          vv_i)
1931 INSN_LASX(xvmaxi_bu,         vv_i)
1932 INSN_LASX(xvmaxi_hu,         vv_i)
1933 INSN_LASX(xvmaxi_wu,         vv_i)
1934 INSN_LASX(xvmaxi_du,         vv_i)
1935 INSN_LASX(xvmini_bu,         vv_i)
1936 INSN_LASX(xvmini_hu,         vv_i)
1937 INSN_LASX(xvmini_wu,         vv_i)
1938 INSN_LASX(xvmini_du,         vv_i)
1939 
1940 INSN_LASX(xvmul_b,           vvv)
1941 INSN_LASX(xvmul_h,           vvv)
1942 INSN_LASX(xvmul_w,           vvv)
1943 INSN_LASX(xvmul_d,           vvv)
1944 INSN_LASX(xvmuh_b,           vvv)
1945 INSN_LASX(xvmuh_h,           vvv)
1946 INSN_LASX(xvmuh_w,           vvv)
1947 INSN_LASX(xvmuh_d,           vvv)
1948 INSN_LASX(xvmuh_bu,          vvv)
1949 INSN_LASX(xvmuh_hu,          vvv)
1950 INSN_LASX(xvmuh_wu,          vvv)
1951 INSN_LASX(xvmuh_du,          vvv)
1952 
1953 INSN_LASX(xvmulwev_h_b,      vvv)
1954 INSN_LASX(xvmulwev_w_h,      vvv)
1955 INSN_LASX(xvmulwev_d_w,      vvv)
1956 INSN_LASX(xvmulwev_q_d,      vvv)
1957 INSN_LASX(xvmulwod_h_b,      vvv)
1958 INSN_LASX(xvmulwod_w_h,      vvv)
1959 INSN_LASX(xvmulwod_d_w,      vvv)
1960 INSN_LASX(xvmulwod_q_d,      vvv)
1961 INSN_LASX(xvmulwev_h_bu,     vvv)
1962 INSN_LASX(xvmulwev_w_hu,     vvv)
1963 INSN_LASX(xvmulwev_d_wu,     vvv)
1964 INSN_LASX(xvmulwev_q_du,     vvv)
1965 INSN_LASX(xvmulwod_h_bu,     vvv)
1966 INSN_LASX(xvmulwod_w_hu,     vvv)
1967 INSN_LASX(xvmulwod_d_wu,     vvv)
1968 INSN_LASX(xvmulwod_q_du,     vvv)
1969 INSN_LASX(xvmulwev_h_bu_b,   vvv)
1970 INSN_LASX(xvmulwev_w_hu_h,   vvv)
1971 INSN_LASX(xvmulwev_d_wu_w,   vvv)
1972 INSN_LASX(xvmulwev_q_du_d,   vvv)
1973 INSN_LASX(xvmulwod_h_bu_b,   vvv)
1974 INSN_LASX(xvmulwod_w_hu_h,   vvv)
1975 INSN_LASX(xvmulwod_d_wu_w,   vvv)
1976 INSN_LASX(xvmulwod_q_du_d,   vvv)
1977 
1978 INSN_LASX(xvmadd_b,          vvv)
1979 INSN_LASX(xvmadd_h,          vvv)
1980 INSN_LASX(xvmadd_w,          vvv)
1981 INSN_LASX(xvmadd_d,          vvv)
1982 INSN_LASX(xvmsub_b,          vvv)
1983 INSN_LASX(xvmsub_h,          vvv)
1984 INSN_LASX(xvmsub_w,          vvv)
1985 INSN_LASX(xvmsub_d,          vvv)
1986 
1987 INSN_LASX(xvmaddwev_h_b,     vvv)
1988 INSN_LASX(xvmaddwev_w_h,     vvv)
1989 INSN_LASX(xvmaddwev_d_w,     vvv)
1990 INSN_LASX(xvmaddwev_q_d,     vvv)
1991 INSN_LASX(xvmaddwod_h_b,     vvv)
1992 INSN_LASX(xvmaddwod_w_h,     vvv)
1993 INSN_LASX(xvmaddwod_d_w,     vvv)
1994 INSN_LASX(xvmaddwod_q_d,     vvv)
1995 INSN_LASX(xvmaddwev_h_bu,    vvv)
1996 INSN_LASX(xvmaddwev_w_hu,    vvv)
1997 INSN_LASX(xvmaddwev_d_wu,    vvv)
1998 INSN_LASX(xvmaddwev_q_du,    vvv)
1999 INSN_LASX(xvmaddwod_h_bu,    vvv)
2000 INSN_LASX(xvmaddwod_w_hu,    vvv)
2001 INSN_LASX(xvmaddwod_d_wu,    vvv)
2002 INSN_LASX(xvmaddwod_q_du,    vvv)
2003 INSN_LASX(xvmaddwev_h_bu_b,  vvv)
2004 INSN_LASX(xvmaddwev_w_hu_h,  vvv)
2005 INSN_LASX(xvmaddwev_d_wu_w,  vvv)
2006 INSN_LASX(xvmaddwev_q_du_d,  vvv)
2007 INSN_LASX(xvmaddwod_h_bu_b,  vvv)
2008 INSN_LASX(xvmaddwod_w_hu_h,  vvv)
2009 INSN_LASX(xvmaddwod_d_wu_w,  vvv)
2010 INSN_LASX(xvmaddwod_q_du_d,  vvv)
2011 
2012 INSN_LASX(xvdiv_b,           vvv)
2013 INSN_LASX(xvdiv_h,           vvv)
2014 INSN_LASX(xvdiv_w,           vvv)
2015 INSN_LASX(xvdiv_d,           vvv)
2016 INSN_LASX(xvdiv_bu,          vvv)
2017 INSN_LASX(xvdiv_hu,          vvv)
2018 INSN_LASX(xvdiv_wu,          vvv)
2019 INSN_LASX(xvdiv_du,          vvv)
2020 INSN_LASX(xvmod_b,           vvv)
2021 INSN_LASX(xvmod_h,           vvv)
2022 INSN_LASX(xvmod_w,           vvv)
2023 INSN_LASX(xvmod_d,           vvv)
2024 INSN_LASX(xvmod_bu,          vvv)
2025 INSN_LASX(xvmod_hu,          vvv)
2026 INSN_LASX(xvmod_wu,          vvv)
2027 INSN_LASX(xvmod_du,          vvv)
2028 
2029 INSN_LASX(xvsat_b,           vv_i)
2030 INSN_LASX(xvsat_h,           vv_i)
2031 INSN_LASX(xvsat_w,           vv_i)
2032 INSN_LASX(xvsat_d,           vv_i)
2033 INSN_LASX(xvsat_bu,          vv_i)
2034 INSN_LASX(xvsat_hu,          vv_i)
2035 INSN_LASX(xvsat_wu,          vv_i)
2036 INSN_LASX(xvsat_du,          vv_i)
2037 
2038 INSN_LASX(xvexth_h_b,        vv)
2039 INSN_LASX(xvexth_w_h,        vv)
2040 INSN_LASX(xvexth_d_w,        vv)
2041 INSN_LASX(xvexth_q_d,        vv)
2042 INSN_LASX(xvexth_hu_bu,      vv)
2043 INSN_LASX(xvexth_wu_hu,      vv)
2044 INSN_LASX(xvexth_du_wu,      vv)
2045 INSN_LASX(xvexth_qu_du,      vv)
2046 
2047 INSN_LASX(vext2xv_h_b,       vv)
2048 INSN_LASX(vext2xv_w_b,       vv)
2049 INSN_LASX(vext2xv_d_b,       vv)
2050 INSN_LASX(vext2xv_w_h,       vv)
2051 INSN_LASX(vext2xv_d_h,       vv)
2052 INSN_LASX(vext2xv_d_w,       vv)
2053 INSN_LASX(vext2xv_hu_bu,     vv)
2054 INSN_LASX(vext2xv_wu_bu,     vv)
2055 INSN_LASX(vext2xv_du_bu,     vv)
2056 INSN_LASX(vext2xv_wu_hu,     vv)
2057 INSN_LASX(vext2xv_du_hu,     vv)
2058 INSN_LASX(vext2xv_du_wu,     vv)
2059 
2060 INSN_LASX(xvsigncov_b,       vvv)
2061 INSN_LASX(xvsigncov_h,       vvv)
2062 INSN_LASX(xvsigncov_w,       vvv)
2063 INSN_LASX(xvsigncov_d,       vvv)
2064 
2065 INSN_LASX(xvmskltz_b,        vv)
2066 INSN_LASX(xvmskltz_h,        vv)
2067 INSN_LASX(xvmskltz_w,        vv)
2068 INSN_LASX(xvmskltz_d,        vv)
2069 INSN_LASX(xvmskgez_b,        vv)
2070 INSN_LASX(xvmsknz_b,         vv)
2071 
2072 INSN_LASX(xvldi,             v_i)
2073 
2074 INSN_LASX(xvand_v,           vvv)
2075 INSN_LASX(xvor_v,            vvv)
2076 INSN_LASX(xvxor_v,           vvv)
2077 INSN_LASX(xvnor_v,           vvv)
2078 INSN_LASX(xvandn_v,          vvv)
2079 INSN_LASX(xvorn_v,           vvv)
2080 
2081 INSN_LASX(xvandi_b,          vv_i)
2082 INSN_LASX(xvori_b,           vv_i)
2083 INSN_LASX(xvxori_b,          vv_i)
2084 INSN_LASX(xvnori_b,          vv_i)
2085 
2086 INSN_LASX(xvsll_b,           vvv)
2087 INSN_LASX(xvsll_h,           vvv)
2088 INSN_LASX(xvsll_w,           vvv)
2089 INSN_LASX(xvsll_d,           vvv)
2090 INSN_LASX(xvslli_b,          vv_i)
2091 INSN_LASX(xvslli_h,          vv_i)
2092 INSN_LASX(xvslli_w,          vv_i)
2093 INSN_LASX(xvslli_d,          vv_i)
2094 
2095 INSN_LASX(xvsrl_b,           vvv)
2096 INSN_LASX(xvsrl_h,           vvv)
2097 INSN_LASX(xvsrl_w,           vvv)
2098 INSN_LASX(xvsrl_d,           vvv)
2099 INSN_LASX(xvsrli_b,          vv_i)
2100 INSN_LASX(xvsrli_h,          vv_i)
2101 INSN_LASX(xvsrli_w,          vv_i)
2102 INSN_LASX(xvsrli_d,          vv_i)
2103 
2104 INSN_LASX(xvsra_b,           vvv)
2105 INSN_LASX(xvsra_h,           vvv)
2106 INSN_LASX(xvsra_w,           vvv)
2107 INSN_LASX(xvsra_d,           vvv)
2108 INSN_LASX(xvsrai_b,          vv_i)
2109 INSN_LASX(xvsrai_h,          vv_i)
2110 INSN_LASX(xvsrai_w,          vv_i)
2111 INSN_LASX(xvsrai_d,          vv_i)
2112 
2113 INSN_LASX(xvrotr_b,          vvv)
2114 INSN_LASX(xvrotr_h,          vvv)
2115 INSN_LASX(xvrotr_w,          vvv)
2116 INSN_LASX(xvrotr_d,          vvv)
2117 INSN_LASX(xvrotri_b,         vv_i)
2118 INSN_LASX(xvrotri_h,         vv_i)
2119 INSN_LASX(xvrotri_w,         vv_i)
2120 INSN_LASX(xvrotri_d,         vv_i)
2121 
2122 INSN_LASX(xvsllwil_h_b,      vv_i)
2123 INSN_LASX(xvsllwil_w_h,      vv_i)
2124 INSN_LASX(xvsllwil_d_w,      vv_i)
2125 INSN_LASX(xvextl_q_d,        vv)
2126 INSN_LASX(xvsllwil_hu_bu,    vv_i)
2127 INSN_LASX(xvsllwil_wu_hu,    vv_i)
2128 INSN_LASX(xvsllwil_du_wu,    vv_i)
2129 INSN_LASX(xvextl_qu_du,      vv)
2130 
2131 INSN_LASX(xvsrlr_b,          vvv)
2132 INSN_LASX(xvsrlr_h,          vvv)
2133 INSN_LASX(xvsrlr_w,          vvv)
2134 INSN_LASX(xvsrlr_d,          vvv)
2135 INSN_LASX(xvsrlri_b,         vv_i)
2136 INSN_LASX(xvsrlri_h,         vv_i)
2137 INSN_LASX(xvsrlri_w,         vv_i)
2138 INSN_LASX(xvsrlri_d,         vv_i)
2139 
2140 INSN_LASX(xvsrar_b,          vvv)
2141 INSN_LASX(xvsrar_h,          vvv)
2142 INSN_LASX(xvsrar_w,          vvv)
2143 INSN_LASX(xvsrar_d,          vvv)
2144 INSN_LASX(xvsrari_b,         vv_i)
2145 INSN_LASX(xvsrari_h,         vv_i)
2146 INSN_LASX(xvsrari_w,         vv_i)
2147 INSN_LASX(xvsrari_d,         vv_i)
2148 
2149 INSN_LASX(xvsrln_b_h,        vvv)
2150 INSN_LASX(xvsrln_h_w,        vvv)
2151 INSN_LASX(xvsrln_w_d,        vvv)
2152 INSN_LASX(xvsran_b_h,        vvv)
2153 INSN_LASX(xvsran_h_w,        vvv)
2154 INSN_LASX(xvsran_w_d,        vvv)
2155 
2156 INSN_LASX(xvsrlni_b_h,       vv_i)
2157 INSN_LASX(xvsrlni_h_w,       vv_i)
2158 INSN_LASX(xvsrlni_w_d,       vv_i)
2159 INSN_LASX(xvsrlni_d_q,       vv_i)
2160 INSN_LASX(xvsrani_b_h,       vv_i)
2161 INSN_LASX(xvsrani_h_w,       vv_i)
2162 INSN_LASX(xvsrani_w_d,       vv_i)
2163 INSN_LASX(xvsrani_d_q,       vv_i)
2164 
2165 INSN_LASX(xvsrlrn_b_h,       vvv)
2166 INSN_LASX(xvsrlrn_h_w,       vvv)
2167 INSN_LASX(xvsrlrn_w_d,       vvv)
2168 INSN_LASX(xvsrarn_b_h,       vvv)
2169 INSN_LASX(xvsrarn_h_w,       vvv)
2170 INSN_LASX(xvsrarn_w_d,       vvv)
2171 
2172 INSN_LASX(xvsrlrni_b_h,      vv_i)
2173 INSN_LASX(xvsrlrni_h_w,      vv_i)
2174 INSN_LASX(xvsrlrni_w_d,      vv_i)
2175 INSN_LASX(xvsrlrni_d_q,      vv_i)
2176 INSN_LASX(xvsrarni_b_h,      vv_i)
2177 INSN_LASX(xvsrarni_h_w,      vv_i)
2178 INSN_LASX(xvsrarni_w_d,      vv_i)
2179 INSN_LASX(xvsrarni_d_q,      vv_i)
2180 
2181 INSN_LASX(xvssrln_b_h,       vvv)
2182 INSN_LASX(xvssrln_h_w,       vvv)
2183 INSN_LASX(xvssrln_w_d,       vvv)
2184 INSN_LASX(xvssran_b_h,       vvv)
2185 INSN_LASX(xvssran_h_w,       vvv)
2186 INSN_LASX(xvssran_w_d,       vvv)
2187 INSN_LASX(xvssrln_bu_h,      vvv)
2188 INSN_LASX(xvssrln_hu_w,      vvv)
2189 INSN_LASX(xvssrln_wu_d,      vvv)
2190 INSN_LASX(xvssran_bu_h,      vvv)
2191 INSN_LASX(xvssran_hu_w,      vvv)
2192 INSN_LASX(xvssran_wu_d,      vvv)
2193 
2194 INSN_LASX(xvssrlni_b_h,      vv_i)
2195 INSN_LASX(xvssrlni_h_w,      vv_i)
2196 INSN_LASX(xvssrlni_w_d,      vv_i)
2197 INSN_LASX(xvssrlni_d_q,      vv_i)
2198 INSN_LASX(xvssrani_b_h,      vv_i)
2199 INSN_LASX(xvssrani_h_w,      vv_i)
2200 INSN_LASX(xvssrani_w_d,      vv_i)
2201 INSN_LASX(xvssrani_d_q,      vv_i)
2202 INSN_LASX(xvssrlni_bu_h,     vv_i)
2203 INSN_LASX(xvssrlni_hu_w,     vv_i)
2204 INSN_LASX(xvssrlni_wu_d,     vv_i)
2205 INSN_LASX(xvssrlni_du_q,     vv_i)
2206 INSN_LASX(xvssrani_bu_h,     vv_i)
2207 INSN_LASX(xvssrani_hu_w,     vv_i)
2208 INSN_LASX(xvssrani_wu_d,     vv_i)
2209 INSN_LASX(xvssrani_du_q,     vv_i)
2210 
2211 INSN_LASX(xvssrlrn_b_h,      vvv)
2212 INSN_LASX(xvssrlrn_h_w,      vvv)
2213 INSN_LASX(xvssrlrn_w_d,      vvv)
2214 INSN_LASX(xvssrarn_b_h,      vvv)
2215 INSN_LASX(xvssrarn_h_w,      vvv)
2216 INSN_LASX(xvssrarn_w_d,      vvv)
2217 INSN_LASX(xvssrlrn_bu_h,     vvv)
2218 INSN_LASX(xvssrlrn_hu_w,     vvv)
2219 INSN_LASX(xvssrlrn_wu_d,     vvv)
2220 INSN_LASX(xvssrarn_bu_h,     vvv)
2221 INSN_LASX(xvssrarn_hu_w,     vvv)
2222 INSN_LASX(xvssrarn_wu_d,     vvv)
2223 
2224 INSN_LASX(xvssrlrni_b_h,     vv_i)
2225 INSN_LASX(xvssrlrni_h_w,     vv_i)
2226 INSN_LASX(xvssrlrni_w_d,     vv_i)
2227 INSN_LASX(xvssrlrni_d_q,     vv_i)
2228 INSN_LASX(xvssrlrni_bu_h,    vv_i)
2229 INSN_LASX(xvssrlrni_hu_w,    vv_i)
2230 INSN_LASX(xvssrlrni_wu_d,    vv_i)
2231 INSN_LASX(xvssrlrni_du_q,    vv_i)
2232 INSN_LASX(xvssrarni_b_h,     vv_i)
2233 INSN_LASX(xvssrarni_h_w,     vv_i)
2234 INSN_LASX(xvssrarni_w_d,     vv_i)
2235 INSN_LASX(xvssrarni_d_q,     vv_i)
2236 INSN_LASX(xvssrarni_bu_h,    vv_i)
2237 INSN_LASX(xvssrarni_hu_w,    vv_i)
2238 INSN_LASX(xvssrarni_wu_d,    vv_i)
2239 INSN_LASX(xvssrarni_du_q,    vv_i)
2240 
2241 INSN_LASX(xvclo_b,           vv)
2242 INSN_LASX(xvclo_h,           vv)
2243 INSN_LASX(xvclo_w,           vv)
2244 INSN_LASX(xvclo_d,           vv)
2245 INSN_LASX(xvclz_b,           vv)
2246 INSN_LASX(xvclz_h,           vv)
2247 INSN_LASX(xvclz_w,           vv)
2248 INSN_LASX(xvclz_d,           vv)
2249 
2250 INSN_LASX(xvpcnt_b,          vv)
2251 INSN_LASX(xvpcnt_h,          vv)
2252 INSN_LASX(xvpcnt_w,          vv)
2253 INSN_LASX(xvpcnt_d,          vv)
2254 
2255 INSN_LASX(xvbitclr_b,        vvv)
2256 INSN_LASX(xvbitclr_h,        vvv)
2257 INSN_LASX(xvbitclr_w,        vvv)
2258 INSN_LASX(xvbitclr_d,        vvv)
2259 INSN_LASX(xvbitclri_b,       vv_i)
2260 INSN_LASX(xvbitclri_h,       vv_i)
2261 INSN_LASX(xvbitclri_w,       vv_i)
2262 INSN_LASX(xvbitclri_d,       vv_i)
2263 INSN_LASX(xvbitset_b,        vvv)
2264 INSN_LASX(xvbitset_h,        vvv)
2265 INSN_LASX(xvbitset_w,        vvv)
2266 INSN_LASX(xvbitset_d,        vvv)
2267 INSN_LASX(xvbitseti_b,       vv_i)
2268 INSN_LASX(xvbitseti_h,       vv_i)
2269 INSN_LASX(xvbitseti_w,       vv_i)
2270 INSN_LASX(xvbitseti_d,       vv_i)
2271 INSN_LASX(xvbitrev_b,        vvv)
2272 INSN_LASX(xvbitrev_h,        vvv)
2273 INSN_LASX(xvbitrev_w,        vvv)
2274 INSN_LASX(xvbitrev_d,        vvv)
2275 INSN_LASX(xvbitrevi_b,       vv_i)
2276 INSN_LASX(xvbitrevi_h,       vv_i)
2277 INSN_LASX(xvbitrevi_w,       vv_i)
2278 INSN_LASX(xvbitrevi_d,       vv_i)
2279 
2280 INSN_LASX(xvfrstp_b,         vvv)
2281 INSN_LASX(xvfrstp_h,         vvv)
2282 INSN_LASX(xvfrstpi_b,        vv_i)
2283 INSN_LASX(xvfrstpi_h,        vv_i)
2284 
2285 INSN_LASX(xvfadd_s,          vvv)
2286 INSN_LASX(xvfadd_d,          vvv)
2287 INSN_LASX(xvfsub_s,          vvv)
2288 INSN_LASX(xvfsub_d,          vvv)
2289 INSN_LASX(xvfmul_s,          vvv)
2290 INSN_LASX(xvfmul_d,          vvv)
2291 INSN_LASX(xvfdiv_s,          vvv)
2292 INSN_LASX(xvfdiv_d,          vvv)
2293 
2294 INSN_LASX(xvfmadd_s,         vvvv)
2295 INSN_LASX(xvfmadd_d,         vvvv)
2296 INSN_LASX(xvfmsub_s,         vvvv)
2297 INSN_LASX(xvfmsub_d,         vvvv)
2298 INSN_LASX(xvfnmadd_s,        vvvv)
2299 INSN_LASX(xvfnmadd_d,        vvvv)
2300 INSN_LASX(xvfnmsub_s,        vvvv)
2301 INSN_LASX(xvfnmsub_d,        vvvv)
2302 
2303 INSN_LASX(xvfmax_s,          vvv)
2304 INSN_LASX(xvfmax_d,          vvv)
2305 INSN_LASX(xvfmin_s,          vvv)
2306 INSN_LASX(xvfmin_d,          vvv)
2307 
2308 INSN_LASX(xvfmaxa_s,         vvv)
2309 INSN_LASX(xvfmaxa_d,         vvv)
2310 INSN_LASX(xvfmina_s,         vvv)
2311 INSN_LASX(xvfmina_d,         vvv)
2312 
2313 INSN_LASX(xvflogb_s,         vv)
2314 INSN_LASX(xvflogb_d,         vv)
2315 
2316 INSN_LASX(xvfclass_s,        vv)
2317 INSN_LASX(xvfclass_d,        vv)
2318 
2319 INSN_LASX(xvfsqrt_s,         vv)
2320 INSN_LASX(xvfsqrt_d,         vv)
2321 INSN_LASX(xvfrecip_s,        vv)
2322 INSN_LASX(xvfrecip_d,        vv)
2323 INSN_LASX(xvfrsqrt_s,        vv)
2324 INSN_LASX(xvfrsqrt_d,        vv)
2325 
2326 INSN_LASX(xvfcvtl_s_h,       vv)
2327 INSN_LASX(xvfcvth_s_h,       vv)
2328 INSN_LASX(xvfcvtl_d_s,       vv)
2329 INSN_LASX(xvfcvth_d_s,       vv)
2330 INSN_LASX(xvfcvt_h_s,        vvv)
2331 INSN_LASX(xvfcvt_s_d,        vvv)
2332 
2333 INSN_LASX(xvfrint_s,         vv)
2334 INSN_LASX(xvfrint_d,         vv)
2335 INSN_LASX(xvfrintrm_s,       vv)
2336 INSN_LASX(xvfrintrm_d,       vv)
2337 INSN_LASX(xvfrintrp_s,       vv)
2338 INSN_LASX(xvfrintrp_d,       vv)
2339 INSN_LASX(xvfrintrz_s,       vv)
2340 INSN_LASX(xvfrintrz_d,       vv)
2341 INSN_LASX(xvfrintrne_s,      vv)
2342 INSN_LASX(xvfrintrne_d,      vv)
2343 
2344 INSN_LASX(xvftint_w_s,       vv)
2345 INSN_LASX(xvftint_l_d,       vv)
2346 INSN_LASX(xvftintrm_w_s,     vv)
2347 INSN_LASX(xvftintrm_l_d,     vv)
2348 INSN_LASX(xvftintrp_w_s,     vv)
2349 INSN_LASX(xvftintrp_l_d,     vv)
2350 INSN_LASX(xvftintrz_w_s,     vv)
2351 INSN_LASX(xvftintrz_l_d,     vv)
2352 INSN_LASX(xvftintrne_w_s,    vv)
2353 INSN_LASX(xvftintrne_l_d,    vv)
2354 INSN_LASX(xvftint_wu_s,      vv)
2355 INSN_LASX(xvftint_lu_d,      vv)
2356 INSN_LASX(xvftintrz_wu_s,    vv)
2357 INSN_LASX(xvftintrz_lu_d,    vv)
2358 INSN_LASX(xvftint_w_d,       vvv)
2359 INSN_LASX(xvftintrm_w_d,     vvv)
2360 INSN_LASX(xvftintrp_w_d,     vvv)
2361 INSN_LASX(xvftintrz_w_d,     vvv)
2362 INSN_LASX(xvftintrne_w_d,    vvv)
2363 INSN_LASX(xvftintl_l_s,      vv)
2364 INSN_LASX(xvftinth_l_s,      vv)
2365 INSN_LASX(xvftintrml_l_s,    vv)
2366 INSN_LASX(xvftintrmh_l_s,    vv)
2367 INSN_LASX(xvftintrpl_l_s,    vv)
2368 INSN_LASX(xvftintrph_l_s,    vv)
2369 INSN_LASX(xvftintrzl_l_s,    vv)
2370 INSN_LASX(xvftintrzh_l_s,    vv)
2371 INSN_LASX(xvftintrnel_l_s,   vv)
2372 INSN_LASX(xvftintrneh_l_s,   vv)
2373 
2374 INSN_LASX(xvffint_s_w,       vv)
2375 INSN_LASX(xvffint_s_wu,      vv)
2376 INSN_LASX(xvffint_d_l,       vv)
2377 INSN_LASX(xvffint_d_lu,      vv)
2378 INSN_LASX(xvffintl_d_w,      vv)
2379 INSN_LASX(xvffinth_d_w,      vv)
2380 INSN_LASX(xvffint_s_l,       vvv)
2381 
2382 INSN_LASX(xvseq_b,           vvv)
2383 INSN_LASX(xvseq_h,           vvv)
2384 INSN_LASX(xvseq_w,           vvv)
2385 INSN_LASX(xvseq_d,           vvv)
2386 INSN_LASX(xvseqi_b,          vv_i)
2387 INSN_LASX(xvseqi_h,          vv_i)
2388 INSN_LASX(xvseqi_w,          vv_i)
2389 INSN_LASX(xvseqi_d,          vv_i)
2390 
2391 INSN_LASX(xvsle_b,           vvv)
2392 INSN_LASX(xvsle_h,           vvv)
2393 INSN_LASX(xvsle_w,           vvv)
2394 INSN_LASX(xvsle_d,           vvv)
2395 INSN_LASX(xvslei_b,          vv_i)
2396 INSN_LASX(xvslei_h,          vv_i)
2397 INSN_LASX(xvslei_w,          vv_i)
2398 INSN_LASX(xvslei_d,          vv_i)
2399 INSN_LASX(xvsle_bu,          vvv)
2400 INSN_LASX(xvsle_hu,          vvv)
2401 INSN_LASX(xvsle_wu,          vvv)
2402 INSN_LASX(xvsle_du,          vvv)
2403 INSN_LASX(xvslei_bu,         vv_i)
2404 INSN_LASX(xvslei_hu,         vv_i)
2405 INSN_LASX(xvslei_wu,         vv_i)
2406 INSN_LASX(xvslei_du,         vv_i)
2407 
2408 INSN_LASX(xvslt_b,           vvv)
2409 INSN_LASX(xvslt_h,           vvv)
2410 INSN_LASX(xvslt_w,           vvv)
2411 INSN_LASX(xvslt_d,           vvv)
2412 INSN_LASX(xvslti_b,          vv_i)
2413 INSN_LASX(xvslti_h,          vv_i)
2414 INSN_LASX(xvslti_w,          vv_i)
2415 INSN_LASX(xvslti_d,          vv_i)
2416 INSN_LASX(xvslt_bu,          vvv)
2417 INSN_LASX(xvslt_hu,          vvv)
2418 INSN_LASX(xvslt_wu,          vvv)
2419 INSN_LASX(xvslt_du,          vvv)
2420 INSN_LASX(xvslti_bu,         vv_i)
2421 INSN_LASX(xvslti_hu,         vv_i)
2422 INSN_LASX(xvslti_wu,         vv_i)
2423 INSN_LASX(xvslti_du,         vv_i)
2424 
2425 #define output_xvfcmp(C, PREFIX, SUFFIX)                                    \
2426 {                                                                           \
2427     (C)->info->fprintf_func((C)->info->stream, "%08x  %s%s\tx%d, x%d, x%d", \
2428                             (C)->insn, PREFIX, SUFFIX, a->vd,               \
2429                             a->vj, a->vk);                                  \
2430 }
2431 static bool output_xxx_fcond(DisasContext *ctx, arg_vvv_fcond * a,
2432                              const char *suffix)
2433 {
2434     bool ret = true;
2435     switch (a->fcond) {
2436     case 0x0:
2437         output_xvfcmp(ctx, "xvfcmp_caf_", suffix);
2438         break;
2439     case 0x1:
2440         output_xvfcmp(ctx, "xvfcmp_saf_", suffix);
2441         break;
2442     case 0x2:
2443         output_xvfcmp(ctx, "xvfcmp_clt_", suffix);
2444         break;
2445     case 0x3:
2446         output_xvfcmp(ctx, "xvfcmp_slt_", suffix);
2447         break;
2448     case 0x4:
2449         output_xvfcmp(ctx, "xvfcmp_ceq_", suffix);
2450         break;
2451     case 0x5:
2452         output_xvfcmp(ctx, "xvfcmp_seq_", suffix);
2453         break;
2454     case 0x6:
2455         output_xvfcmp(ctx, "xvfcmp_cle_", suffix);
2456         break;
2457     case 0x7:
2458         output_xvfcmp(ctx, "xvfcmp_sle_", suffix);
2459         break;
2460     case 0x8:
2461         output_xvfcmp(ctx, "xvfcmp_cun_", suffix);
2462         break;
2463     case 0x9:
2464         output_xvfcmp(ctx, "xvfcmp_sun_", suffix);
2465         break;
2466     case 0xA:
2467         output_xvfcmp(ctx, "xvfcmp_cult_", suffix);
2468         break;
2469     case 0xB:
2470         output_xvfcmp(ctx, "xvfcmp_sult_", suffix);
2471         break;
2472     case 0xC:
2473         output_xvfcmp(ctx, "xvfcmp_cueq_", suffix);
2474         break;
2475     case 0xD:
2476         output_xvfcmp(ctx, "xvfcmp_sueq_", suffix);
2477         break;
2478     case 0xE:
2479         output_xvfcmp(ctx, "xvfcmp_cule_", suffix);
2480         break;
2481     case 0xF:
2482         output_xvfcmp(ctx, "xvfcmp_sule_", suffix);
2483         break;
2484     case 0x10:
2485         output_xvfcmp(ctx, "xvfcmp_cne_", suffix);
2486         break;
2487     case 0x11:
2488         output_xvfcmp(ctx, "xvfcmp_sne_", suffix);
2489         break;
2490     case 0x14:
2491         output_xvfcmp(ctx, "xvfcmp_cor_", suffix);
2492         break;
2493     case 0x15:
2494         output_xvfcmp(ctx, "xvfcmp_sor_", suffix);
2495         break;
2496     case 0x18:
2497         output_xvfcmp(ctx, "xvfcmp_cune_", suffix);
2498         break;
2499     case 0x19:
2500         output_xvfcmp(ctx, "xvfcmp_sune_", suffix);
2501         break;
2502     default:
2503         ret = false;
2504     }
2505     return ret;
2506 }
2507 
2508 #define LASX_FCMP_INSN(suffix)                            \
2509 static bool trans_xvfcmp_cond_##suffix(DisasContext *ctx, \
2510                                        arg_vvv_fcond * a) \
2511 {                                                         \
2512     return output_xxx_fcond(ctx, a, #suffix);             \
2513 }
2514 
2515 LASX_FCMP_INSN(s)
2516 LASX_FCMP_INSN(d)
2517 
2518 INSN_LASX(xvbitsel_v,        vvvv)
2519 INSN_LASX(xvbitseli_b,       vv_i)
2520 
2521 INSN_LASX(xvseteqz_v,        cv)
2522 INSN_LASX(xvsetnez_v,        cv)
2523 INSN_LASX(xvsetanyeqz_b,     cv)
2524 INSN_LASX(xvsetanyeqz_h,     cv)
2525 INSN_LASX(xvsetanyeqz_w,     cv)
2526 INSN_LASX(xvsetanyeqz_d,     cv)
2527 INSN_LASX(xvsetallnez_b,     cv)
2528 INSN_LASX(xvsetallnez_h,     cv)
2529 INSN_LASX(xvsetallnez_w,     cv)
2530 INSN_LASX(xvsetallnez_d,     cv)
2531 
2532 INSN_LASX(xvinsgr2vr_w,      vr_i)
2533 INSN_LASX(xvinsgr2vr_d,      vr_i)
2534 INSN_LASX(xvpickve2gr_w,     rv_i)
2535 INSN_LASX(xvpickve2gr_d,     rv_i)
2536 INSN_LASX(xvpickve2gr_wu,    rv_i)
2537 INSN_LASX(xvpickve2gr_du,    rv_i)
2538 
2539 INSN_LASX(xvreplgr2vr_b,     vr)
2540 INSN_LASX(xvreplgr2vr_h,     vr)
2541 INSN_LASX(xvreplgr2vr_w,     vr)
2542 INSN_LASX(xvreplgr2vr_d,     vr)
2543 
2544 INSN_LASX(xvreplve_b,        vvr)
2545 INSN_LASX(xvreplve_h,        vvr)
2546 INSN_LASX(xvreplve_w,        vvr)
2547 INSN_LASX(xvreplve_d,        vvr)
2548 INSN_LASX(xvrepl128vei_b,    vv_i)
2549 INSN_LASX(xvrepl128vei_h,    vv_i)
2550 INSN_LASX(xvrepl128vei_w,    vv_i)
2551 INSN_LASX(xvrepl128vei_d,    vv_i)
2552 
2553 INSN_LASX(xvreplve0_b,       vv)
2554 INSN_LASX(xvreplve0_h,       vv)
2555 INSN_LASX(xvreplve0_w,       vv)
2556 INSN_LASX(xvreplve0_d,       vv)
2557 INSN_LASX(xvreplve0_q,       vv)
2558 
2559 INSN_LASX(xvinsve0_w,        vv_i)
2560 INSN_LASX(xvinsve0_d,        vv_i)
2561 
2562 INSN_LASX(xvpickve_w,        vv_i)
2563 INSN_LASX(xvpickve_d,        vv_i)
2564 
2565 INSN_LASX(xvbsll_v,          vv_i)
2566 INSN_LASX(xvbsrl_v,          vv_i)
2567 
2568 INSN_LASX(xvpackev_b,        vvv)
2569 INSN_LASX(xvpackev_h,        vvv)
2570 INSN_LASX(xvpackev_w,        vvv)
2571 INSN_LASX(xvpackev_d,        vvv)
2572 INSN_LASX(xvpackod_b,        vvv)
2573 INSN_LASX(xvpackod_h,        vvv)
2574 INSN_LASX(xvpackod_w,        vvv)
2575 INSN_LASX(xvpackod_d,        vvv)
2576 
2577 INSN_LASX(xvpickev_b,        vvv)
2578 INSN_LASX(xvpickev_h,        vvv)
2579 INSN_LASX(xvpickev_w,        vvv)
2580 INSN_LASX(xvpickev_d,        vvv)
2581 INSN_LASX(xvpickod_b,        vvv)
2582 INSN_LASX(xvpickod_h,        vvv)
2583 INSN_LASX(xvpickod_w,        vvv)
2584 INSN_LASX(xvpickod_d,        vvv)
2585 
2586 INSN_LASX(xvilvl_b,          vvv)
2587 INSN_LASX(xvilvl_h,          vvv)
2588 INSN_LASX(xvilvl_w,          vvv)
2589 INSN_LASX(xvilvl_d,          vvv)
2590 INSN_LASX(xvilvh_b,          vvv)
2591 INSN_LASX(xvilvh_h,          vvv)
2592 INSN_LASX(xvilvh_w,          vvv)
2593 INSN_LASX(xvilvh_d,          vvv)
2594 
2595 INSN_LASX(xvshuf_b,          vvvv)
2596 INSN_LASX(xvshuf_h,          vvv)
2597 INSN_LASX(xvshuf_w,          vvv)
2598 INSN_LASX(xvshuf_d,          vvv)
2599 
2600 INSN_LASX(xvperm_w,          vvv)
2601 
2602 INSN_LASX(xvshuf4i_b,        vv_i)
2603 INSN_LASX(xvshuf4i_h,        vv_i)
2604 INSN_LASX(xvshuf4i_w,        vv_i)
2605 INSN_LASX(xvshuf4i_d,        vv_i)
2606 
2607 INSN_LASX(xvpermi_w,         vv_i)
2608 INSN_LASX(xvpermi_d,         vv_i)
2609 INSN_LASX(xvpermi_q,         vv_i)
2610 
2611 INSN_LASX(xvextrins_d,       vv_i)
2612 INSN_LASX(xvextrins_w,       vv_i)
2613 INSN_LASX(xvextrins_h,       vv_i)
2614 INSN_LASX(xvextrins_b,       vv_i)
2615 
2616 INSN_LASX(xvld,              vr_i)
2617 INSN_LASX(xvst,              vr_i)
2618 INSN_LASX(xvldx,             vrr)
2619 INSN_LASX(xvstx,             vrr)
2620 
2621 INSN_LASX(xvldrepl_d,        vr_i)
2622 INSN_LASX(xvldrepl_w,        vr_i)
2623 INSN_LASX(xvldrepl_h,        vr_i)
2624 INSN_LASX(xvldrepl_b,        vr_i)
2625 INSN_LASX(xvstelm_d,         vr_ii)
2626 INSN_LASX(xvstelm_w,         vr_ii)
2627 INSN_LASX(xvstelm_h,         vr_ii)
2628 INSN_LASX(xvstelm_b,         vr_ii)
2629