1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * QEMU LoongArch Disassembler
5 * Copyright (c) 2021 Loongson Technology Corporation Limited.
8 #include "qemu/osdep.h"
9 #include "disas/dis-asm.h"
10 #include "qemu/bitops.h"
14 disassemble_info
*info
;
19 static inline int plus_1(DisasContext
*ctx
, int x
)
24 static inline int shl_2(DisasContext
*ctx
, int x
)
29 #define CSR_NAME(REG) \
30 [LOONGARCH_CSR_##REG] = (#REG)
32 static const char * const csr_names
[] = {
107 static const char *get_csr_name(unsigned num
)
109 return ((num
< ARRAY_SIZE(csr_names
)) && (csr_names
[num
] != NULL
)) ?
110 csr_names
[num
] : "Undefined CSR";
113 #define output(C, INSN, FMT, ...) \
115 (C)->info->fprintf_func((C)->info->stream, "%08x %-9s\t" FMT, \
116 (C)->insn, INSN, ##__VA_ARGS__); \
119 #include "decode-insns.c.inc"
121 int print_insn_loongarch(bfd_vma memaddr
, struct disassemble_info
*info
)
127 status
= (*info
->read_memory_func
)(memaddr
, buffer
, 4, info
);
129 (*info
->memory_error_func
)(status
, memaddr
, info
);
132 insn
= bfd_getl32(buffer
);
139 if (!decode(&ctx
, insn
)) {
140 output(&ctx
, "illegal", "");
145 static void output_r_i(DisasContext
*ctx
, arg_r_i
*a
, const char *mnemonic
)
147 output(ctx
, mnemonic
, "r%d, %d", a
->rd
, a
->imm
);
150 static void output_rrr(DisasContext
*ctx
, arg_rrr
*a
, const char *mnemonic
)
152 output(ctx
, mnemonic
, "r%d, r%d, r%d", a
->rd
, a
->rj
, a
->rk
);
155 static void output_rr_i(DisasContext
*ctx
, arg_rr_i
*a
, const char *mnemonic
)
157 output(ctx
, mnemonic
, "r%d, r%d, %d", a
->rd
, a
->rj
, a
->imm
);
160 static void output_rrr_sa(DisasContext
*ctx
, arg_rrr_sa
*a
,
161 const char *mnemonic
)
163 output(ctx
, mnemonic
, "r%d, r%d, r%d, %d", a
->rd
, a
->rj
, a
->rk
, a
->sa
);
166 static void output_rr(DisasContext
*ctx
, arg_rr
*a
, const char *mnemonic
)
168 output(ctx
, mnemonic
, "r%d, r%d", a
->rd
, a
->rj
);
171 static void output_rr_ms_ls(DisasContext
*ctx
, arg_rr_ms_ls
*a
,
172 const char *mnemonic
)
174 output(ctx
, mnemonic
, "r%d, r%d, %d, %d", a
->rd
, a
->rj
, a
->ms
, a
->ls
);
177 static void output_hint_r_i(DisasContext
*ctx
, arg_hint_r_i
*a
,
178 const char *mnemonic
)
180 output(ctx
, mnemonic
, "%d, r%d, %d", a
->hint
, a
->rj
, a
->imm
);
183 static void output_i(DisasContext
*ctx
, arg_i
*a
, const char *mnemonic
)
185 output(ctx
, mnemonic
, "%d", a
->imm
);
188 static void output_rr_jk(DisasContext
*ctx
, arg_rr_jk
*a
,
189 const char *mnemonic
)
191 output(ctx
, mnemonic
, "r%d, r%d", a
->rj
, a
->rk
);
194 static void output_ff(DisasContext
*ctx
, arg_ff
*a
, const char *mnemonic
)
196 output(ctx
, mnemonic
, "f%d, f%d", a
->fd
, a
->fj
);
199 static void output_fff(DisasContext
*ctx
, arg_fff
*a
, const char *mnemonic
)
201 output(ctx
, mnemonic
, "f%d, f%d, f%d", a
->fd
, a
->fj
, a
->fk
);
204 static void output_ffff(DisasContext
*ctx
, arg_ffff
*a
, const char *mnemonic
)
206 output(ctx
, mnemonic
, "f%d, f%d, f%d, f%d", a
->fd
, a
->fj
, a
->fk
, a
->fa
);
209 static void output_fffc(DisasContext
*ctx
, arg_fffc
*a
, const char *mnemonic
)
211 output(ctx
, mnemonic
, "f%d, f%d, f%d, %d", a
->fd
, a
->fj
, a
->fk
, a
->ca
);
214 static void output_fr(DisasContext
*ctx
, arg_fr
*a
, const char *mnemonic
)
216 output(ctx
, mnemonic
, "f%d, r%d", a
->fd
, a
->rj
);
219 static void output_rf(DisasContext
*ctx
, arg_rf
*a
, const char *mnemonic
)
221 output(ctx
, mnemonic
, "r%d, f%d", a
->rd
, a
->fj
);
224 static void output_fcsrd_r(DisasContext
*ctx
, arg_fcsrd_r
*a
,
225 const char *mnemonic
)
227 output(ctx
, mnemonic
, "fcsr%d, r%d", a
->fcsrd
, a
->rj
);
230 static void output_r_fcsrs(DisasContext
*ctx
, arg_r_fcsrs
*a
,
231 const char *mnemonic
)
233 output(ctx
, mnemonic
, "r%d, fcsr%d", a
->rd
, a
->fcsrs
);
236 static void output_cf(DisasContext
*ctx
, arg_cf
*a
, const char *mnemonic
)
238 output(ctx
, mnemonic
, "fcc%d, f%d", a
->cd
, a
->fj
);
241 static void output_fc(DisasContext
*ctx
, arg_fc
*a
, const char *mnemonic
)
243 output(ctx
, mnemonic
, "f%d, fcc%d", a
->fd
, a
->cj
);
246 static void output_cr(DisasContext
*ctx
, arg_cr
*a
, const char *mnemonic
)
248 output(ctx
, mnemonic
, "fcc%d, r%d", a
->cd
, a
->rj
);
251 static void output_rc(DisasContext
*ctx
, arg_rc
*a
, const char *mnemonic
)
253 output(ctx
, mnemonic
, "r%d, fcc%d", a
->rd
, a
->cj
);
256 static void output_frr(DisasContext
*ctx
, arg_frr
*a
, const char *mnemonic
)
258 output(ctx
, mnemonic
, "f%d, r%d, r%d", a
->fd
, a
->rj
, a
->rk
);
261 static void output_fr_i(DisasContext
*ctx
, arg_fr_i
*a
, const char *mnemonic
)
263 output(ctx
, mnemonic
, "f%d, r%d, %d", a
->fd
, a
->rj
, a
->imm
);
266 static void output_r_offs(DisasContext
*ctx
, arg_r_offs
*a
,
267 const char *mnemonic
)
269 output(ctx
, mnemonic
, "r%d, %d # 0x%" PRIx64
, a
->rj
, a
->offs
,
273 static void output_c_offs(DisasContext
*ctx
, arg_c_offs
*a
,
274 const char *mnemonic
)
276 output(ctx
, mnemonic
, "fcc%d, %d # 0x%" PRIx64
, a
->cj
, a
->offs
,
280 static void output_offs(DisasContext
*ctx
, arg_offs
*a
,
281 const char *mnemonic
)
283 output(ctx
, mnemonic
, "%d # 0x%" PRIx64
, a
->offs
, ctx
->pc
+ a
->offs
);
286 static void output_rr_offs(DisasContext
*ctx
, arg_rr_offs
*a
,
287 const char *mnemonic
)
289 output(ctx
, mnemonic
, "r%d, r%d, %d # 0x%" PRIx64
, a
->rj
,
290 a
->rd
, a
->offs
, ctx
->pc
+ a
->offs
);
293 static void output_r_csr(DisasContext
*ctx
, arg_r_csr
*a
,
294 const char *mnemonic
)
296 output(ctx
, mnemonic
, "r%d, %d # %s", a
->rd
, a
->csr
, get_csr_name(a
->csr
));
299 static void output_rr_csr(DisasContext
*ctx
, arg_rr_csr
*a
,
300 const char *mnemonic
)
302 output(ctx
, mnemonic
, "r%d, r%d, %d # %s",
303 a
->rd
, a
->rj
, a
->csr
, get_csr_name(a
->csr
));
306 static void output_empty(DisasContext
*ctx
, arg_empty
*a
,
307 const char *mnemonic
)
309 output(ctx
, mnemonic
, "");
312 static void output_i_rr(DisasContext
*ctx
, arg_i_rr
*a
, const char *mnemonic
)
314 output(ctx
, mnemonic
, "%d, r%d, r%d", a
->imm
, a
->rj
, a
->rk
);
317 static void output_cop_r_i(DisasContext
*ctx
, arg_cop_r_i
*a
,
318 const char *mnemonic
)
320 output(ctx
, mnemonic
, "%d, r%d, %d", a
->cop
, a
->rj
, a
->imm
);
323 static void output_j_i(DisasContext
*ctx
, arg_j_i
*a
, const char *mnemonic
)
325 output(ctx
, mnemonic
, "r%d, %d", a
->rj
, a
->imm
);
328 #define INSN(insn, type) \
329 static bool trans_##insn(DisasContext *ctx, arg_##type * a) \
331 output_##type(ctx, a, #insn); \
359 INSN(asrtle_d
, rr_jk
)
360 INSN(asrtgt_d
, rr_jk
)
362 INSN(alsl_wu
, rrr_sa
)
363 INSN(bytepick_w
, rrr_sa
)
364 INSN(bytepick_d
, rrr_sa
)
407 INSN(crcc_w_b_w
, rrr
)
408 INSN(crcc_w_h_w
, rrr
)
409 INSN(crcc_w_w_w
, rrr
)
410 INSN(crcc_w_d_w
, rrr
)
422 INSN(bstrins_w
, rr_ms_ls
)
423 INSN(bstrpick_w
, rr_ms_ls
)
424 INSN(bstrins_d
, rr_ms_ls
)
425 INSN(bstrpick_d
, rr_ms_ls
)
444 INSN(fcopysign_s
, fff
)
445 INSN(fcopysign_d
, fff
)
464 INSN(movgr2frh_w
, fr
)
467 INSN(movfrh2gr_s
, rf
)
468 INSN(movgr2fcsr
, fcsrd_r
)
469 INSN(movfcsr2gr
, r_fcsrs
)
476 INSN(ftintrm_w_s
, ff
)
477 INSN(ftintrm_w_d
, ff
)
478 INSN(ftintrm_l_s
, ff
)
479 INSN(ftintrm_l_d
, ff
)
480 INSN(ftintrp_w_s
, ff
)
481 INSN(ftintrp_w_d
, ff
)
482 INSN(ftintrp_l_s
, ff
)
483 INSN(ftintrp_l_d
, ff
)
484 INSN(ftintrz_w_s
, ff
)
485 INSN(ftintrz_w_d
, ff
)
486 INSN(ftintrz_l_s
, ff
)
487 INSN(ftintrz_l_d
, ff
)
488 INSN(ftintrne_w_s
, ff
)
489 INSN(ftintrne_w_d
, ff
)
490 INSN(ftintrne_l_s
, ff
)
491 INSN(ftintrne_l_d
, ff
)
519 INSN(addu16i_d
, rr_i
)
541 INSN(preld
, hint_r_i
)
579 INSN(amswap_db_w
, rrr
)
580 INSN(amswap_db_d
, rrr
)
581 INSN(amadd_db_w
, rrr
)
582 INSN(amadd_db_d
, rrr
)
583 INSN(amand_db_w
, rrr
)
584 INSN(amand_db_d
, rrr
)
587 INSN(amxor_db_w
, rrr
)
588 INSN(amxor_db_d
, rrr
)
589 INSN(ammax_db_w
, rrr
)
590 INSN(ammax_db_d
, rrr
)
591 INSN(ammin_db_w
, rrr
)
592 INSN(ammin_db_d
, rrr
)
593 INSN(ammax_db_wu
, rrr
)
594 INSN(ammax_db_du
, rrr
)
595 INSN(ammin_db_wu
, rrr
)
596 INSN(ammin_db_du
, rrr
)
638 INSN(csrxchg
, rr_csr
)
652 INSN(tlbflush
, empty
)
661 #define output_fcmp(C, PREFIX, SUFFIX) \
663 (C)->info->fprintf_func((C)->info->stream, "%08x %s%s\tfcc%d, f%d, f%d", \
664 (C)->insn, PREFIX, SUFFIX, a->cd, \
668 static bool output_cff_fcond(DisasContext
*ctx
, arg_cff_fcond
* a
,
674 output_fcmp(ctx
, "fcmp_caf_", suffix
);
677 output_fcmp(ctx
, "fcmp_saf_", suffix
);
680 output_fcmp(ctx
, "fcmp_clt_", suffix
);
683 output_fcmp(ctx
, "fcmp_slt_", suffix
);
686 output_fcmp(ctx
, "fcmp_ceq_", suffix
);
689 output_fcmp(ctx
, "fcmp_seq_", suffix
);
692 output_fcmp(ctx
, "fcmp_cle_", suffix
);
695 output_fcmp(ctx
, "fcmp_sle_", suffix
);
698 output_fcmp(ctx
, "fcmp_cun_", suffix
);
701 output_fcmp(ctx
, "fcmp_sun_", suffix
);
704 output_fcmp(ctx
, "fcmp_cult_", suffix
);
707 output_fcmp(ctx
, "fcmp_sult_", suffix
);
710 output_fcmp(ctx
, "fcmp_cueq_", suffix
);
713 output_fcmp(ctx
, "fcmp_sueq_", suffix
);
716 output_fcmp(ctx
, "fcmp_cule_", suffix
);
719 output_fcmp(ctx
, "fcmp_sule_", suffix
);
722 output_fcmp(ctx
, "fcmp_cne_", suffix
);
725 output_fcmp(ctx
, "fcmp_sne_", suffix
);
728 output_fcmp(ctx
, "fcmp_cor_", suffix
);
731 output_fcmp(ctx
, "fcmp_sor_", suffix
);
734 output_fcmp(ctx
, "fcmp_cune_", suffix
);
737 output_fcmp(ctx
, "fcmp_sune_", suffix
);
745 #define FCMP_INSN(suffix) \
746 static bool trans_fcmp_cond_##suffix(DisasContext *ctx, \
749 return output_cff_fcond(ctx, a, #suffix); \
755 #define PCADD_INSN(name) \
756 static bool trans_##name(DisasContext *ctx, arg_##name *a) \
758 output(ctx, #name, "r%d, %d # 0x%" PRIx64, \
759 a->rd, a->imm, gen_##name(ctx->pc, a->imm)); \
763 static uint64_t gen_pcaddi(uint64_t pc
, int imm
)
765 return pc
+ (imm
<< 2);
768 static uint64_t gen_pcalau12i(uint64_t pc
, int imm
)
770 return (pc
+ (imm
<< 12)) & ~0xfff;
773 static uint64_t gen_pcaddu12i(uint64_t pc
, int imm
)
775 return pc
+ (imm
<< 12);
778 static uint64_t gen_pcaddu18i(uint64_t pc
, int imm
)
780 return pc
+ ((uint64_t)(imm
) << 18);
784 PCADD_INSN(pcalau12i
)
785 PCADD_INSN(pcaddu12i
)
786 PCADD_INSN(pcaddu18i
)
788 #define INSN_LSX(insn, type) \
789 static bool trans_##insn(DisasContext *ctx, arg_##type * a) \
791 output_##type(ctx, a, #insn); \
795 static void output_vvv(DisasContext
*ctx
, arg_vvv
*a
, const char *mnemonic
)
797 output(ctx
, mnemonic
, "v%d, v%d, v%d", a
->vd
, a
->vj
, a
->vk
);
800 static void output_vv_i(DisasContext
*ctx
, arg_vv_i
*a
, const char *mnemonic
)
802 output(ctx
, mnemonic
, "v%d, v%d, 0x%x", a
->vd
, a
->vj
, a
->imm
);
805 static void output_vv(DisasContext
*ctx
, arg_vv
*a
, const char *mnemonic
)
807 output(ctx
, mnemonic
, "v%d, v%d", a
->vd
, a
->vj
);
810 INSN_LSX(vadd_b
, vvv
)
811 INSN_LSX(vadd_h
, vvv
)
812 INSN_LSX(vadd_w
, vvv
)
813 INSN_LSX(vadd_d
, vvv
)
814 INSN_LSX(vadd_q
, vvv
)
815 INSN_LSX(vsub_b
, vvv
)
816 INSN_LSX(vsub_h
, vvv
)
817 INSN_LSX(vsub_w
, vvv
)
818 INSN_LSX(vsub_d
, vvv
)
819 INSN_LSX(vsub_q
, vvv
)
821 INSN_LSX(vaddi_bu
, vv_i
)
822 INSN_LSX(vaddi_hu
, vv_i
)
823 INSN_LSX(vaddi_wu
, vv_i
)
824 INSN_LSX(vaddi_du
, vv_i
)
825 INSN_LSX(vsubi_bu
, vv_i
)
826 INSN_LSX(vsubi_hu
, vv_i
)
827 INSN_LSX(vsubi_wu
, vv_i
)
828 INSN_LSX(vsubi_du
, vv_i
)
835 INSN_LSX(vsadd_b
, vvv
)
836 INSN_LSX(vsadd_h
, vvv
)
837 INSN_LSX(vsadd_w
, vvv
)
838 INSN_LSX(vsadd_d
, vvv
)
839 INSN_LSX(vsadd_bu
, vvv
)
840 INSN_LSX(vsadd_hu
, vvv
)
841 INSN_LSX(vsadd_wu
, vvv
)
842 INSN_LSX(vsadd_du
, vvv
)
843 INSN_LSX(vssub_b
, vvv
)
844 INSN_LSX(vssub_h
, vvv
)
845 INSN_LSX(vssub_w
, vvv
)
846 INSN_LSX(vssub_d
, vvv
)
847 INSN_LSX(vssub_bu
, vvv
)
848 INSN_LSX(vssub_hu
, vvv
)
849 INSN_LSX(vssub_wu
, vvv
)
850 INSN_LSX(vssub_du
, vvv
)
852 INSN_LSX(vhaddw_h_b
, vvv
)
853 INSN_LSX(vhaddw_w_h
, vvv
)
854 INSN_LSX(vhaddw_d_w
, vvv
)
855 INSN_LSX(vhaddw_q_d
, vvv
)
856 INSN_LSX(vhaddw_hu_bu
, vvv
)
857 INSN_LSX(vhaddw_wu_hu
, vvv
)
858 INSN_LSX(vhaddw_du_wu
, vvv
)
859 INSN_LSX(vhaddw_qu_du
, vvv
)
860 INSN_LSX(vhsubw_h_b
, vvv
)
861 INSN_LSX(vhsubw_w_h
, vvv
)
862 INSN_LSX(vhsubw_d_w
, vvv
)
863 INSN_LSX(vhsubw_q_d
, vvv
)
864 INSN_LSX(vhsubw_hu_bu
, vvv
)
865 INSN_LSX(vhsubw_wu_hu
, vvv
)
866 INSN_LSX(vhsubw_du_wu
, vvv
)
867 INSN_LSX(vhsubw_qu_du
, vvv
)
869 INSN_LSX(vaddwev_h_b
, vvv
)
870 INSN_LSX(vaddwev_w_h
, vvv
)
871 INSN_LSX(vaddwev_d_w
, vvv
)
872 INSN_LSX(vaddwev_q_d
, vvv
)
873 INSN_LSX(vaddwod_h_b
, vvv
)
874 INSN_LSX(vaddwod_w_h
, vvv
)
875 INSN_LSX(vaddwod_d_w
, vvv
)
876 INSN_LSX(vaddwod_q_d
, vvv
)
877 INSN_LSX(vsubwev_h_b
, vvv
)
878 INSN_LSX(vsubwev_w_h
, vvv
)
879 INSN_LSX(vsubwev_d_w
, vvv
)
880 INSN_LSX(vsubwev_q_d
, vvv
)
881 INSN_LSX(vsubwod_h_b
, vvv
)
882 INSN_LSX(vsubwod_w_h
, vvv
)
883 INSN_LSX(vsubwod_d_w
, vvv
)
884 INSN_LSX(vsubwod_q_d
, vvv
)
886 INSN_LSX(vaddwev_h_bu
, vvv
)
887 INSN_LSX(vaddwev_w_hu
, vvv
)
888 INSN_LSX(vaddwev_d_wu
, vvv
)
889 INSN_LSX(vaddwev_q_du
, vvv
)
890 INSN_LSX(vaddwod_h_bu
, vvv
)
891 INSN_LSX(vaddwod_w_hu
, vvv
)
892 INSN_LSX(vaddwod_d_wu
, vvv
)
893 INSN_LSX(vaddwod_q_du
, vvv
)
894 INSN_LSX(vsubwev_h_bu
, vvv
)
895 INSN_LSX(vsubwev_w_hu
, vvv
)
896 INSN_LSX(vsubwev_d_wu
, vvv
)
897 INSN_LSX(vsubwev_q_du
, vvv
)
898 INSN_LSX(vsubwod_h_bu
, vvv
)
899 INSN_LSX(vsubwod_w_hu
, vvv
)
900 INSN_LSX(vsubwod_d_wu
, vvv
)
901 INSN_LSX(vsubwod_q_du
, vvv
)
903 INSN_LSX(vaddwev_h_bu_b
, vvv
)
904 INSN_LSX(vaddwev_w_hu_h
, vvv
)
905 INSN_LSX(vaddwev_d_wu_w
, vvv
)
906 INSN_LSX(vaddwev_q_du_d
, vvv
)
907 INSN_LSX(vaddwod_h_bu_b
, vvv
)
908 INSN_LSX(vaddwod_w_hu_h
, vvv
)
909 INSN_LSX(vaddwod_d_wu_w
, vvv
)
910 INSN_LSX(vaddwod_q_du_d
, vvv
)
912 INSN_LSX(vavg_b
, vvv
)
913 INSN_LSX(vavg_h
, vvv
)
914 INSN_LSX(vavg_w
, vvv
)
915 INSN_LSX(vavg_d
, vvv
)
916 INSN_LSX(vavg_bu
, vvv
)
917 INSN_LSX(vavg_hu
, vvv
)
918 INSN_LSX(vavg_wu
, vvv
)
919 INSN_LSX(vavg_du
, vvv
)
920 INSN_LSX(vavgr_b
, vvv
)
921 INSN_LSX(vavgr_h
, vvv
)
922 INSN_LSX(vavgr_w
, vvv
)
923 INSN_LSX(vavgr_d
, vvv
)
924 INSN_LSX(vavgr_bu
, vvv
)
925 INSN_LSX(vavgr_hu
, vvv
)
926 INSN_LSX(vavgr_wu
, vvv
)
927 INSN_LSX(vavgr_du
, vvv
)
929 INSN_LSX(vabsd_b
, vvv
)
930 INSN_LSX(vabsd_h
, vvv
)
931 INSN_LSX(vabsd_w
, vvv
)
932 INSN_LSX(vabsd_d
, vvv
)
933 INSN_LSX(vabsd_bu
, vvv
)
934 INSN_LSX(vabsd_hu
, vvv
)
935 INSN_LSX(vabsd_wu
, vvv
)
936 INSN_LSX(vabsd_du
, vvv
)
938 INSN_LSX(vadda_b
, vvv
)
939 INSN_LSX(vadda_h
, vvv
)
940 INSN_LSX(vadda_w
, vvv
)
941 INSN_LSX(vadda_d
, vvv
)
943 INSN_LSX(vmax_b
, vvv
)
944 INSN_LSX(vmax_h
, vvv
)
945 INSN_LSX(vmax_w
, vvv
)
946 INSN_LSX(vmax_d
, vvv
)
947 INSN_LSX(vmin_b
, vvv
)
948 INSN_LSX(vmin_h
, vvv
)
949 INSN_LSX(vmin_w
, vvv
)
950 INSN_LSX(vmin_d
, vvv
)
951 INSN_LSX(vmax_bu
, vvv
)
952 INSN_LSX(vmax_hu
, vvv
)
953 INSN_LSX(vmax_wu
, vvv
)
954 INSN_LSX(vmax_du
, vvv
)
955 INSN_LSX(vmin_bu
, vvv
)
956 INSN_LSX(vmin_hu
, vvv
)
957 INSN_LSX(vmin_wu
, vvv
)
958 INSN_LSX(vmin_du
, vvv
)
959 INSN_LSX(vmaxi_b
, vv_i
)
960 INSN_LSX(vmaxi_h
, vv_i
)
961 INSN_LSX(vmaxi_w
, vv_i
)
962 INSN_LSX(vmaxi_d
, vv_i
)
963 INSN_LSX(vmini_b
, vv_i
)
964 INSN_LSX(vmini_h
, vv_i
)
965 INSN_LSX(vmini_w
, vv_i
)
966 INSN_LSX(vmini_d
, vv_i
)
967 INSN_LSX(vmaxi_bu
, vv_i
)
968 INSN_LSX(vmaxi_hu
, vv_i
)
969 INSN_LSX(vmaxi_wu
, vv_i
)
970 INSN_LSX(vmaxi_du
, vv_i
)
971 INSN_LSX(vmini_bu
, vv_i
)
972 INSN_LSX(vmini_hu
, vv_i
)
973 INSN_LSX(vmini_wu
, vv_i
)
974 INSN_LSX(vmini_du
, vv_i
)
976 INSN_LSX(vmul_b
, vvv
)
977 INSN_LSX(vmul_h
, vvv
)
978 INSN_LSX(vmul_w
, vvv
)
979 INSN_LSX(vmul_d
, vvv
)
980 INSN_LSX(vmuh_b
, vvv
)
981 INSN_LSX(vmuh_h
, vvv
)
982 INSN_LSX(vmuh_w
, vvv
)
983 INSN_LSX(vmuh_d
, vvv
)
984 INSN_LSX(vmuh_bu
, vvv
)
985 INSN_LSX(vmuh_hu
, vvv
)
986 INSN_LSX(vmuh_wu
, vvv
)
987 INSN_LSX(vmuh_du
, vvv
)
989 INSN_LSX(vmulwev_h_b
, vvv
)
990 INSN_LSX(vmulwev_w_h
, vvv
)
991 INSN_LSX(vmulwev_d_w
, vvv
)
992 INSN_LSX(vmulwev_q_d
, vvv
)
993 INSN_LSX(vmulwod_h_b
, vvv
)
994 INSN_LSX(vmulwod_w_h
, vvv
)
995 INSN_LSX(vmulwod_d_w
, vvv
)
996 INSN_LSX(vmulwod_q_d
, vvv
)
997 INSN_LSX(vmulwev_h_bu
, vvv
)
998 INSN_LSX(vmulwev_w_hu
, vvv
)
999 INSN_LSX(vmulwev_d_wu
, vvv
)
1000 INSN_LSX(vmulwev_q_du
, vvv
)
1001 INSN_LSX(vmulwod_h_bu
, vvv
)
1002 INSN_LSX(vmulwod_w_hu
, vvv
)
1003 INSN_LSX(vmulwod_d_wu
, vvv
)
1004 INSN_LSX(vmulwod_q_du
, vvv
)
1005 INSN_LSX(vmulwev_h_bu_b
, vvv
)
1006 INSN_LSX(vmulwev_w_hu_h
, vvv
)
1007 INSN_LSX(vmulwev_d_wu_w
, vvv
)
1008 INSN_LSX(vmulwev_q_du_d
, vvv
)
1009 INSN_LSX(vmulwod_h_bu_b
, vvv
)
1010 INSN_LSX(vmulwod_w_hu_h
, vvv
)
1011 INSN_LSX(vmulwod_d_wu_w
, vvv
)
1012 INSN_LSX(vmulwod_q_du_d
, vvv
)
1014 INSN_LSX(vmadd_b
, vvv
)
1015 INSN_LSX(vmadd_h
, vvv
)
1016 INSN_LSX(vmadd_w
, vvv
)
1017 INSN_LSX(vmadd_d
, vvv
)
1018 INSN_LSX(vmsub_b
, vvv
)
1019 INSN_LSX(vmsub_h
, vvv
)
1020 INSN_LSX(vmsub_w
, vvv
)
1021 INSN_LSX(vmsub_d
, vvv
)
1023 INSN_LSX(vmaddwev_h_b
, vvv
)
1024 INSN_LSX(vmaddwev_w_h
, vvv
)
1025 INSN_LSX(vmaddwev_d_w
, vvv
)
1026 INSN_LSX(vmaddwev_q_d
, vvv
)
1027 INSN_LSX(vmaddwod_h_b
, vvv
)
1028 INSN_LSX(vmaddwod_w_h
, vvv
)
1029 INSN_LSX(vmaddwod_d_w
, vvv
)
1030 INSN_LSX(vmaddwod_q_d
, vvv
)
1031 INSN_LSX(vmaddwev_h_bu
, vvv
)
1032 INSN_LSX(vmaddwev_w_hu
, vvv
)
1033 INSN_LSX(vmaddwev_d_wu
, vvv
)
1034 INSN_LSX(vmaddwev_q_du
, vvv
)
1035 INSN_LSX(vmaddwod_h_bu
, vvv
)
1036 INSN_LSX(vmaddwod_w_hu
, vvv
)
1037 INSN_LSX(vmaddwod_d_wu
, vvv
)
1038 INSN_LSX(vmaddwod_q_du
, vvv
)
1039 INSN_LSX(vmaddwev_h_bu_b
, vvv
)
1040 INSN_LSX(vmaddwev_w_hu_h
, vvv
)
1041 INSN_LSX(vmaddwev_d_wu_w
, vvv
)
1042 INSN_LSX(vmaddwev_q_du_d
, vvv
)
1043 INSN_LSX(vmaddwod_h_bu_b
, vvv
)
1044 INSN_LSX(vmaddwod_w_hu_h
, vvv
)
1045 INSN_LSX(vmaddwod_d_wu_w
, vvv
)
1046 INSN_LSX(vmaddwod_q_du_d
, vvv
)
1048 INSN_LSX(vdiv_b
, vvv
)
1049 INSN_LSX(vdiv_h
, vvv
)
1050 INSN_LSX(vdiv_w
, vvv
)
1051 INSN_LSX(vdiv_d
, vvv
)
1052 INSN_LSX(vdiv_bu
, vvv
)
1053 INSN_LSX(vdiv_hu
, vvv
)
1054 INSN_LSX(vdiv_wu
, vvv
)
1055 INSN_LSX(vdiv_du
, vvv
)
1056 INSN_LSX(vmod_b
, vvv
)
1057 INSN_LSX(vmod_h
, vvv
)
1058 INSN_LSX(vmod_w
, vvv
)
1059 INSN_LSX(vmod_d
, vvv
)
1060 INSN_LSX(vmod_bu
, vvv
)
1061 INSN_LSX(vmod_hu
, vvv
)
1062 INSN_LSX(vmod_wu
, vvv
)
1063 INSN_LSX(vmod_du
, vvv
)
1065 INSN_LSX(vsat_b
, vv_i
)
1066 INSN_LSX(vsat_h
, vv_i
)
1067 INSN_LSX(vsat_w
, vv_i
)
1068 INSN_LSX(vsat_d
, vv_i
)
1069 INSN_LSX(vsat_bu
, vv_i
)
1070 INSN_LSX(vsat_hu
, vv_i
)
1071 INSN_LSX(vsat_wu
, vv_i
)
1072 INSN_LSX(vsat_du
, vv_i
)
1074 INSN_LSX(vexth_h_b
, vv
)
1075 INSN_LSX(vexth_w_h
, vv
)
1076 INSN_LSX(vexth_d_w
, vv
)
1077 INSN_LSX(vexth_q_d
, vv
)
1078 INSN_LSX(vexth_hu_bu
, vv
)
1079 INSN_LSX(vexth_wu_hu
, vv
)
1080 INSN_LSX(vexth_du_wu
, vv
)
1081 INSN_LSX(vexth_qu_du
, vv
)
1083 INSN_LSX(vsigncov_b
, vvv
)
1084 INSN_LSX(vsigncov_h
, vvv
)
1085 INSN_LSX(vsigncov_w
, vvv
)
1086 INSN_LSX(vsigncov_d
, vvv
)
1088 INSN_LSX(vmskltz_b
, vv
)
1089 INSN_LSX(vmskltz_h
, vv
)
1090 INSN_LSX(vmskltz_w
, vv
)
1091 INSN_LSX(vmskltz_d
, vv
)
1092 INSN_LSX(vmskgez_b
, vv
)
1093 INSN_LSX(vmsknz_b
, vv
)
1095 INSN_LSX(vand_v
, vvv
)
1096 INSN_LSX(vor_v
, vvv
)
1097 INSN_LSX(vxor_v
, vvv
)
1098 INSN_LSX(vnor_v
, vvv
)
1099 INSN_LSX(vandn_v
, vvv
)
1100 INSN_LSX(vorn_v
, vvv
)
1102 INSN_LSX(vandi_b
, vv_i
)
1103 INSN_LSX(vori_b
, vv_i
)
1104 INSN_LSX(vxori_b
, vv_i
)
1105 INSN_LSX(vnori_b
, vv_i
)
1107 INSN_LSX(vsll_b
, vvv
)
1108 INSN_LSX(vsll_h
, vvv
)
1109 INSN_LSX(vsll_w
, vvv
)
1110 INSN_LSX(vsll_d
, vvv
)
1111 INSN_LSX(vslli_b
, vv_i
)
1112 INSN_LSX(vslli_h
, vv_i
)
1113 INSN_LSX(vslli_w
, vv_i
)
1114 INSN_LSX(vslli_d
, vv_i
)
1116 INSN_LSX(vsrl_b
, vvv
)
1117 INSN_LSX(vsrl_h
, vvv
)
1118 INSN_LSX(vsrl_w
, vvv
)
1119 INSN_LSX(vsrl_d
, vvv
)
1120 INSN_LSX(vsrli_b
, vv_i
)
1121 INSN_LSX(vsrli_h
, vv_i
)
1122 INSN_LSX(vsrli_w
, vv_i
)
1123 INSN_LSX(vsrli_d
, vv_i
)
1125 INSN_LSX(vsra_b
, vvv
)
1126 INSN_LSX(vsra_h
, vvv
)
1127 INSN_LSX(vsra_w
, vvv
)
1128 INSN_LSX(vsra_d
, vvv
)
1129 INSN_LSX(vsrai_b
, vv_i
)
1130 INSN_LSX(vsrai_h
, vv_i
)
1131 INSN_LSX(vsrai_w
, vv_i
)
1132 INSN_LSX(vsrai_d
, vv_i
)
1134 INSN_LSX(vrotr_b
, vvv
)
1135 INSN_LSX(vrotr_h
, vvv
)
1136 INSN_LSX(vrotr_w
, vvv
)
1137 INSN_LSX(vrotr_d
, vvv
)
1138 INSN_LSX(vrotri_b
, vv_i
)
1139 INSN_LSX(vrotri_h
, vv_i
)
1140 INSN_LSX(vrotri_w
, vv_i
)
1141 INSN_LSX(vrotri_d
, vv_i
)
1143 INSN_LSX(vsllwil_h_b
, vv_i
)
1144 INSN_LSX(vsllwil_w_h
, vv_i
)
1145 INSN_LSX(vsllwil_d_w
, vv_i
)
1146 INSN_LSX(vextl_q_d
, vv
)
1147 INSN_LSX(vsllwil_hu_bu
, vv_i
)
1148 INSN_LSX(vsllwil_wu_hu
, vv_i
)
1149 INSN_LSX(vsllwil_du_wu
, vv_i
)
1150 INSN_LSX(vextl_qu_du
, vv
)
1152 INSN_LSX(vsrlr_b
, vvv
)
1153 INSN_LSX(vsrlr_h
, vvv
)
1154 INSN_LSX(vsrlr_w
, vvv
)
1155 INSN_LSX(vsrlr_d
, vvv
)
1156 INSN_LSX(vsrlri_b
, vv_i
)
1157 INSN_LSX(vsrlri_h
, vv_i
)
1158 INSN_LSX(vsrlri_w
, vv_i
)
1159 INSN_LSX(vsrlri_d
, vv_i
)
1161 INSN_LSX(vsrar_b
, vvv
)
1162 INSN_LSX(vsrar_h
, vvv
)
1163 INSN_LSX(vsrar_w
, vvv
)
1164 INSN_LSX(vsrar_d
, vvv
)
1165 INSN_LSX(vsrari_b
, vv_i
)
1166 INSN_LSX(vsrari_h
, vv_i
)
1167 INSN_LSX(vsrari_w
, vv_i
)
1168 INSN_LSX(vsrari_d
, vv_i
)
1170 INSN_LSX(vsrln_b_h
, vvv
)
1171 INSN_LSX(vsrln_h_w
, vvv
)
1172 INSN_LSX(vsrln_w_d
, vvv
)
1173 INSN_LSX(vsran_b_h
, vvv
)
1174 INSN_LSX(vsran_h_w
, vvv
)
1175 INSN_LSX(vsran_w_d
, vvv
)
1177 INSN_LSX(vsrlni_b_h
, vv_i
)
1178 INSN_LSX(vsrlni_h_w
, vv_i
)
1179 INSN_LSX(vsrlni_w_d
, vv_i
)
1180 INSN_LSX(vsrlni_d_q
, vv_i
)
1181 INSN_LSX(vsrani_b_h
, vv_i
)
1182 INSN_LSX(vsrani_h_w
, vv_i
)
1183 INSN_LSX(vsrani_w_d
, vv_i
)
1184 INSN_LSX(vsrani_d_q
, vv_i
)