Lines Matching refs:df

32 #define DF_BITS(df) (1 << ((df) + 3))  argument
34 #define DF_MAX_INT(df) (int64_t)((1LL << (DF_BITS(df) - 1)) - 1) argument
37 #define DF_MIN_INT(df) (int64_t)(-(1LL << (DF_BITS(df) - 1))) argument
40 #define DF_MAX_UINT(df) (uint64_t)(-1ULL >> (64 - DF_BITS(df))) argument
43 #define UNSIGNED(x, df) ((x) & DF_MAX_UINT(df)) argument
44 #define SIGNED(x, df) \ argument
45 ((((int64_t)x) << (64 - DF_BITS(df))) >> (64 - DF_BITS(df)))
48 #define DF_ELEMENTS(df) (MSA_WRLEN / DF_BITS(df)) argument
72 static inline int64_t msa_nlzc_df(uint32_t df, int64_t arg) in msa_nlzc_df() argument
77 x = UNSIGNED(arg, df); in msa_nlzc_df()
78 n = DF_BITS(df); in msa_nlzc_df()
79 c = DF_BITS(df) / 2; in msa_nlzc_df()
93 static inline int64_t msa_nloc_df(uint32_t df, int64_t arg) in msa_nloc_df() argument
95 return msa_nlzc_df(df, UNSIGNED((~arg), df)); in msa_nloc_df()
214 static inline int64_t msa_pcnt_df(uint32_t df, int64_t arg) in msa_pcnt_df() argument
218 x = UNSIGNED(arg, df); in msa_pcnt_df()
309 #define BIT_POSITION(x, df) ((uint64_t)(x) % DF_BITS(df)) argument
311 static inline int64_t msa_binsl_df(uint32_t df, in msa_binsl_df() argument
314 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_binsl_df()
315 uint64_t u_dest = UNSIGNED(dest, df); in msa_binsl_df()
316 int32_t sh_d = BIT_POSITION(arg2, df) + 1; in msa_binsl_df()
317 int32_t sh_a = DF_BITS(df) - sh_d; in msa_binsl_df()
318 if (sh_d == DF_BITS(df)) { in msa_binsl_df()
321 return UNSIGNED(UNSIGNED(u_dest << sh_d, df) >> sh_d, df) | in msa_binsl_df()
322 UNSIGNED(UNSIGNED(u_arg1 >> sh_a, df) << sh_a, df); in msa_binsl_df()
392 static inline int64_t msa_binsr_df(uint32_t df, in msa_binsr_df() argument
395 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_binsr_df()
396 uint64_t u_dest = UNSIGNED(dest, df); in msa_binsr_df()
397 int32_t sh_d = BIT_POSITION(arg2, df) + 1; in msa_binsr_df()
398 int32_t sh_a = DF_BITS(df) - sh_d; in msa_binsr_df()
399 if (sh_d == DF_BITS(df)) { in msa_binsr_df()
402 return UNSIGNED(UNSIGNED(u_dest >> sh_d, df) << sh_d, df) | in msa_binsr_df()
403 UNSIGNED(UNSIGNED(u_arg1 << sh_a, df) >> sh_a, df); in msa_binsr_df()
530 static inline int64_t msa_bclr_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_bclr_df() argument
532 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_bclr_df()
533 return UNSIGNED(arg1 & (~(1LL << b_arg2)), df); in msa_bclr_df()
598 static inline int64_t msa_bneg_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_bneg_df() argument
600 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_bneg_df()
601 return UNSIGNED(arg1 ^ (1LL << b_arg2), df); in msa_bneg_df()
666 static inline int64_t msa_bset_df(uint32_t df, int64_t arg1, in msa_bset_df() argument
669 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_bset_df()
670 return UNSIGNED(arg1 | (1LL << b_arg2), df); in msa_bset_df()
813 static inline int64_t msa_add_a_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_add_a_df() argument
887 static inline int64_t msa_adds_a_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_adds_a_df() argument
889 uint64_t max_int = (uint64_t)DF_MAX_INT(df); in msa_adds_a_df()
966 static inline int64_t msa_adds_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_adds_s_df() argument
968 int64_t max_int = DF_MAX_INT(df); in msa_adds_s_df()
969 int64_t min_int = DF_MIN_INT(df); in msa_adds_s_df()
1044 static inline uint64_t msa_adds_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) in msa_adds_u_df() argument
1046 uint64_t max_uint = DF_MAX_UINT(df); in msa_adds_u_df()
1047 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_adds_u_df()
1048 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_adds_u_df()
1119 static inline int64_t msa_addv_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_addv_df() argument
1191 #define SIGNED_EVEN(a, df) \ argument
1192 ((((int64_t)(a)) << (64 - DF_BITS(df) / 2)) >> (64 - DF_BITS(df) / 2))
1194 #define UNSIGNED_EVEN(a, df) \ argument
1195 ((((uint64_t)(a)) << (64 - DF_BITS(df) / 2)) >> (64 - DF_BITS(df) / 2))
1197 #define SIGNED_ODD(a, df) \ argument
1198 ((((int64_t)(a)) << (64 - DF_BITS(df))) >> (64 - DF_BITS(df) / 2))
1200 #define UNSIGNED_ODD(a, df) \ argument
1201 ((((uint64_t)(a)) << (64 - DF_BITS(df))) >> (64 - DF_BITS(df) / 2))
1204 static inline int64_t msa_hadd_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_hadd_s_df() argument
1206 return SIGNED_ODD(arg1, df) + SIGNED_EVEN(arg2, df); in msa_hadd_s_df()
1251 static inline int64_t msa_hadd_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_hadd_u_df() argument
1253 return UNSIGNED_ODD(arg1, df) + UNSIGNED_EVEN(arg2, df); in msa_hadd_u_df()
1322 static inline int64_t msa_ave_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_ave_s_df() argument
1394 static inline uint64_t msa_ave_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) in msa_ave_u_df() argument
1396 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_ave_u_df()
1397 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_ave_u_df()
1468 static inline int64_t msa_aver_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_aver_s_df() argument
1540 static inline uint64_t msa_aver_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) in msa_aver_u_df() argument
1542 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_aver_u_df()
1543 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_aver_u_df()
1643 static inline int64_t msa_ceq_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_ceq_df() argument
1730 static inline int64_t msa_cle_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_cle_s_df() argument
1801 static inline int64_t msa_cle_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_cle_u_df() argument
1803 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_cle_u_df()
1804 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_cle_u_df()
1874 static inline int64_t msa_clt_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_clt_s_df() argument
1965 static inline int64_t msa_clt_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_clt_u_df() argument
1967 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_clt_u_df()
1968 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_clt_u_df()
2056 static inline int64_t msa_div_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_div_s_df() argument
2058 if (arg1 == DF_MIN_INT(df) && arg2 == -1) { in msa_div_s_df()
2059 return DF_MIN_INT(df); in msa_div_s_df()
2131 static inline int64_t msa_div_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_div_u_df() argument
2133 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_div_u_df()
2134 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_div_u_df()
2231 #define SIGNED_EXTRACT(e, o, a, df) \ argument
2233 e = SIGNED_EVEN(a, df); \
2234 o = SIGNED_ODD(a, df); \
2237 #define UNSIGNED_EXTRACT(e, o, a, df) \ argument
2239 e = UNSIGNED_EVEN(a, df); \
2240 o = UNSIGNED_ODD(a, df); \
2244 static inline int64_t msa_dotp_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_dotp_s_df() argument
2250 SIGNED_EXTRACT(even_arg1, odd_arg1, arg1, df); in msa_dotp_s_df()
2251 SIGNED_EXTRACT(even_arg2, odd_arg2, arg2, df); in msa_dotp_s_df()
2297 static inline int64_t msa_dotp_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_dotp_u_df() argument
2303 UNSIGNED_EXTRACT(even_arg1, odd_arg1, arg1, df); in msa_dotp_u_df()
2304 UNSIGNED_EXTRACT(even_arg2, odd_arg2, arg2, df); in msa_dotp_u_df()
2350 static inline int64_t msa_dpadd_s_df(uint32_t df, int64_t dest, int64_t arg1, in msa_dpadd_s_df() argument
2357 SIGNED_EXTRACT(even_arg1, odd_arg1, arg1, df); in msa_dpadd_s_df()
2358 SIGNED_EXTRACT(even_arg2, odd_arg2, arg2, df); in msa_dpadd_s_df()
2404 static inline int64_t msa_dpadd_u_df(uint32_t df, int64_t dest, int64_t arg1, in msa_dpadd_u_df() argument
2411 UNSIGNED_EXTRACT(even_arg1, odd_arg1, arg1, df); in msa_dpadd_u_df()
2412 UNSIGNED_EXTRACT(even_arg2, odd_arg2, arg2, df); in msa_dpadd_u_df()
2458 static inline int64_t msa_dpsub_s_df(uint32_t df, int64_t dest, int64_t arg1, in msa_dpsub_s_df() argument
2465 SIGNED_EXTRACT(even_arg1, odd_arg1, arg1, df); in msa_dpsub_s_df()
2466 SIGNED_EXTRACT(even_arg2, odd_arg2, arg2, df); in msa_dpsub_s_df()
2512 static inline int64_t msa_dpsub_u_df(uint32_t df, int64_t dest, int64_t arg1, in msa_dpsub_u_df() argument
2519 UNSIGNED_EXTRACT(even_arg1, odd_arg1, arg1, df); in msa_dpsub_u_df()
2520 UNSIGNED_EXTRACT(even_arg2, odd_arg2, arg2, df); in msa_dpsub_u_df()
2598 static inline int64_t msa_max_a_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_max_a_df() argument
2672 static inline int64_t msa_max_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_max_s_df() argument
2744 static inline int64_t msa_max_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_max_u_df() argument
2746 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_max_u_df()
2747 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_max_u_df()
2818 static inline int64_t msa_min_a_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_min_a_df() argument
2892 static inline int64_t msa_min_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_min_s_df() argument
2964 static inline int64_t msa_min_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_min_u_df() argument
2966 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_min_u_df()
2967 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_min_u_df()
3054 static inline int64_t msa_mod_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_mod_s_df() argument
3056 if (arg1 == DF_MIN_INT(df) && arg2 == -1) { in msa_mod_s_df()
3128 static inline int64_t msa_mod_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_mod_u_df() argument
3130 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_mod_u_df()
3131 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_mod_u_df()
3222 static inline int64_t msa_maddv_df(uint32_t df, int64_t dest, int64_t arg1, in msa_maddv_df() argument
3294 static inline int64_t msa_msubv_df(uint32_t df, int64_t dest, int64_t arg1, in msa_msubv_df() argument
3367 static inline int64_t msa_mulv_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_mulv_df() argument
3482 static inline int64_t msa_asub_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_asub_s_df() argument
3556 static inline uint64_t msa_asub_u_df(uint32_t df, uint64_t arg1, uint64_t arg2) in msa_asub_u_df() argument
3558 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_asub_u_df()
3559 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_asub_u_df()
3632 static inline int64_t msa_hsub_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_hsub_s_df() argument
3634 return SIGNED_ODD(arg1, df) - SIGNED_EVEN(arg2, df); in msa_hsub_s_df()
3679 static inline int64_t msa_hsub_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_hsub_u_df() argument
3681 return UNSIGNED_ODD(arg1, df) - UNSIGNED_EVEN(arg2, df); in msa_hsub_u_df()
3726 static inline int64_t msa_subs_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_subs_s_df() argument
3728 int64_t max_int = DF_MAX_INT(df); in msa_subs_s_df()
3729 int64_t min_int = DF_MIN_INT(df); in msa_subs_s_df()
3804 static inline int64_t msa_subs_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_subs_u_df() argument
3806 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_subs_u_df()
3807 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_subs_u_df()
3878 static inline int64_t msa_subsus_u_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_subsus_u_df() argument
3880 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_subsus_u_df()
3881 uint64_t max_uint = DF_MAX_UINT(df); in msa_subsus_u_df()
3962 static inline int64_t msa_subsuu_s_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_subsuu_s_df() argument
3964 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_subsuu_s_df()
3965 uint64_t u_arg2 = UNSIGNED(arg2, df); in msa_subsuu_s_df()
3966 int64_t max_int = DF_MAX_INT(df); in msa_subsuu_s_df()
3967 int64_t min_int = DF_MIN_INT(df); in msa_subsuu_s_df()
4046 static inline int64_t msa_subv_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_subv_df() argument
4896 static inline int64_t msa_sll_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_sll_df() argument
4898 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_sll_df()
4969 static inline int64_t msa_sra_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_sra_df() argument
4971 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_sra_df()
5042 static inline int64_t msa_srar_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_srar_df() argument
5044 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_srar_df()
5120 static inline int64_t msa_srl_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_srl_df() argument
5122 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_srl_df()
5123 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_srl_df()
5194 static inline int64_t msa_srlr_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_srlr_df() argument
5196 uint64_t u_arg1 = UNSIGNED(arg1, df); in msa_srlr_df()
5197 int32_t b_arg2 = BIT_POSITION(arg2, df); in msa_srlr_df()
5290 #define BIT_MOVE_IF_NOT_ZERO(dest, arg1, arg2, df) \ argument
5291 UNSIGNED(((dest & (~arg2)) | (arg1 & arg2)), df)
5295 #define BIT_MOVE_IF_ZERO(dest, arg1, arg2, df) \ argument
5296 UNSIGNED((dest & arg2) | (arg1 & (~arg2)), df)
5300 #define BIT_SELECT(dest, arg1, arg2, df) \ argument
5301 UNSIGNED((arg1 & (~dest)) | (arg2 & dest), df)
5312 void helper_msa_shf_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_shf_df() argument
5320 switch (df) { in helper_msa_shf_df()
5343 void helper_msa_ ## helper ## _df(CPUMIPSState *env, uint32_t df, \
5350 switch (df) { \
5353 pwd->b[i] = msa_ ## func ## _df(df, pws->b[i], u5); \
5358 pwd->h[i] = msa_ ## func ## _df(df, pws->h[i], u5); \
5363 pwd->w[i] = msa_ ## func ## _df(df, pws->w[i], u5); \
5368 pwd->d[i] = msa_ ## func ## _df(df, pws->d[i], u5); \
5389 void helper_msa_ldi_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in MSA_BINOP_IMM_DF()
5395 switch (df) { in MSA_BINOP_IMM_DF()
5421 static inline int64_t msa_sat_s_df(uint32_t df, int64_t arg, uint32_t m) in msa_sat_s_df() argument
5428 static inline int64_t msa_sat_u_df(uint32_t df, int64_t arg, uint32_t m) in msa_sat_u_df() argument
5430 uint64_t u_arg = UNSIGNED(arg, df); in msa_sat_u_df()
5436 void helper_msa_ ## helper ## _df(CPUMIPSState *env, uint32_t df, uint32_t wd, \
5443 switch (df) { \
5446 pwd->b[i] = msa_ ## func ## _df(df, pws->b[i], u5); \
5451 pwd->h[i] = msa_ ## func ## _df(df, pws->h[i], u5); \
5456 pwd->w[i] = msa_ ## func ## _df(df, pws->w[i], u5); \
5461 pwd->d[i] = msa_ ## func ## _df(df, pws->d[i], u5); \
5482 void helper_msa_ ## helper ## _df(CPUMIPSState *env, uint32_t df, \ in MSA_BINOP_IMMU_DF()
5489 switch (df) { \ in MSA_BINOP_IMMU_DF()
5492 pwd->b[i] = msa_ ## func ## _df(df, pwd->b[i], pws->b[i], \ in MSA_BINOP_IMMU_DF()
5498 pwd->h[i] = msa_ ## func ## _df(df, pwd->h[i], pws->h[i], \ in MSA_BINOP_IMMU_DF()
5504 pwd->w[i] = msa_ ## func ## _df(df, pwd->w[i], pws->w[i], \ in MSA_BINOP_IMMU_DF()
5510 pwd->d[i] = msa_ ## func ## _df(df, pwd->d[i], pws->d[i], \ in MSA_BINOP_IMMU_DF()
5534 static inline void msa_sld_df(uint32_t df, wr_t *pwd,
5537 uint32_t n = rt % DF_ELEMENTS(df);
5541 switch (df) {
5565 static inline int64_t msa_mul_q_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_mul_q_df() argument
5567 int64_t q_min = DF_MIN_INT(df); in msa_mul_q_df()
5568 int64_t q_max = DF_MAX_INT(df); in msa_mul_q_df()
5573 return (arg1 * arg2) >> (DF_BITS(df) - 1); in msa_mul_q_df()
5576 static inline int64_t msa_mulr_q_df(uint32_t df, int64_t arg1, int64_t arg2) in msa_mulr_q_df() argument
5578 int64_t q_min = DF_MIN_INT(df); in msa_mulr_q_df()
5579 int64_t q_max = DF_MAX_INT(df); in msa_mulr_q_df()
5580 int64_t r_bit = 1 << (DF_BITS(df) - 2); in msa_mulr_q_df()
5585 return (arg1 * arg2 + r_bit) >> (DF_BITS(df) - 1); in msa_mulr_q_df()
5589 void helper_msa_ ## func ## _df(CPUMIPSState *env, uint32_t df, \
5596 switch (df) { \
5598 pwd->b[0] = msa_ ## func ## _df(df, pws->b[0], pwt->b[0]); \
5599 pwd->b[1] = msa_ ## func ## _df(df, pws->b[1], pwt->b[1]); \
5600 pwd->b[2] = msa_ ## func ## _df(df, pws->b[2], pwt->b[2]); \
5601 pwd->b[3] = msa_ ## func ## _df(df, pws->b[3], pwt->b[3]); \
5602 pwd->b[4] = msa_ ## func ## _df(df, pws->b[4], pwt->b[4]); \
5603 pwd->b[5] = msa_ ## func ## _df(df, pws->b[5], pwt->b[5]); \
5604 pwd->b[6] = msa_ ## func ## _df(df, pws->b[6], pwt->b[6]); \
5605 pwd->b[7] = msa_ ## func ## _df(df, pws->b[7], pwt->b[7]); \
5606 pwd->b[8] = msa_ ## func ## _df(df, pws->b[8], pwt->b[8]); \
5607 pwd->b[9] = msa_ ## func ## _df(df, pws->b[9], pwt->b[9]); \
5608 pwd->b[10] = msa_ ## func ## _df(df, pws->b[10], pwt->b[10]); \
5609 pwd->b[11] = msa_ ## func ## _df(df, pws->b[11], pwt->b[11]); \
5610 pwd->b[12] = msa_ ## func ## _df(df, pws->b[12], pwt->b[12]); \
5611 pwd->b[13] = msa_ ## func ## _df(df, pws->b[13], pwt->b[13]); \
5612 pwd->b[14] = msa_ ## func ## _df(df, pws->b[14], pwt->b[14]); \
5613 pwd->b[15] = msa_ ## func ## _df(df, pws->b[15], pwt->b[15]); \
5616 pwd->h[0] = msa_ ## func ## _df(df, pws->h[0], pwt->h[0]); \
5617 pwd->h[1] = msa_ ## func ## _df(df, pws->h[1], pwt->h[1]); \
5618 pwd->h[2] = msa_ ## func ## _df(df, pws->h[2], pwt->h[2]); \
5619 pwd->h[3] = msa_ ## func ## _df(df, pws->h[3], pwt->h[3]); \
5620 pwd->h[4] = msa_ ## func ## _df(df, pws->h[4], pwt->h[4]); \
5621 pwd->h[5] = msa_ ## func ## _df(df, pws->h[5], pwt->h[5]); \
5622 pwd->h[6] = msa_ ## func ## _df(df, pws->h[6], pwt->h[6]); \
5623 pwd->h[7] = msa_ ## func ## _df(df, pws->h[7], pwt->h[7]); \
5626 pwd->w[0] = msa_ ## func ## _df(df, pws->w[0], pwt->w[0]); \
5627 pwd->w[1] = msa_ ## func ## _df(df, pws->w[1], pwt->w[1]); \
5628 pwd->w[2] = msa_ ## func ## _df(df, pws->w[2], pwt->w[2]); \
5629 pwd->w[3] = msa_ ## func ## _df(df, pws->w[3], pwt->w[3]); \
5632 pwd->d[0] = msa_ ## func ## _df(df, pws->d[0], pwt->d[0]); \
5633 pwd->d[1] = msa_ ## func ## _df(df, pws->d[1], pwt->d[1]); \
5644 void helper_msa_sld_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in MSA_BINOP_DF()
5650 msa_sld_df(df, pwd, pws, env->active_tc.gpr[rt]); in MSA_BINOP_DF()
5653 static inline int64_t msa_madd_q_df(uint32_t df, int64_t dest, int64_t arg1, in msa_madd_q_df() argument
5658 int64_t q_max = DF_MAX_INT(df); in msa_madd_q_df()
5659 int64_t q_min = DF_MIN_INT(df); in msa_madd_q_df()
5662 q_ret = ((dest << (DF_BITS(df) - 1)) + q_prod) >> (DF_BITS(df) - 1); in msa_madd_q_df()
5667 static inline int64_t msa_msub_q_df(uint32_t df, int64_t dest, int64_t arg1, in msa_msub_q_df() argument
5672 int64_t q_max = DF_MAX_INT(df); in msa_msub_q_df()
5673 int64_t q_min = DF_MIN_INT(df); in msa_msub_q_df()
5676 q_ret = ((dest << (DF_BITS(df) - 1)) - q_prod) >> (DF_BITS(df) - 1); in msa_msub_q_df()
5681 static inline int64_t msa_maddr_q_df(uint32_t df, int64_t dest, int64_t arg1, in msa_maddr_q_df() argument
5686 int64_t q_max = DF_MAX_INT(df); in msa_maddr_q_df()
5687 int64_t q_min = DF_MIN_INT(df); in msa_maddr_q_df()
5688 int64_t r_bit = 1 << (DF_BITS(df) - 2); in msa_maddr_q_df()
5691 q_ret = ((dest << (DF_BITS(df) - 1)) + q_prod + r_bit) >> (DF_BITS(df) - 1); in msa_maddr_q_df()
5696 static inline int64_t msa_msubr_q_df(uint32_t df, int64_t dest, int64_t arg1, in msa_msubr_q_df() argument
5701 int64_t q_max = DF_MAX_INT(df); in msa_msubr_q_df()
5702 int64_t q_min = DF_MIN_INT(df); in msa_msubr_q_df()
5703 int64_t r_bit = 1 << (DF_BITS(df) - 2); in msa_msubr_q_df()
5706 q_ret = ((dest << (DF_BITS(df) - 1)) - q_prod + r_bit) >> (DF_BITS(df) - 1); in msa_msubr_q_df()
5712 void helper_msa_ ## func ## _df(CPUMIPSState *env, uint32_t df, uint32_t wd, \
5719 switch (df) { \
5721 pwd->b[0] = msa_ ## func ## _df(df, pwd->b[0], pws->b[0], \
5723 pwd->b[1] = msa_ ## func ## _df(df, pwd->b[1], pws->b[1], \
5725 pwd->b[2] = msa_ ## func ## _df(df, pwd->b[2], pws->b[2], \
5727 pwd->b[3] = msa_ ## func ## _df(df, pwd->b[3], pws->b[3], \
5729 pwd->b[4] = msa_ ## func ## _df(df, pwd->b[4], pws->b[4], \
5731 pwd->b[5] = msa_ ## func ## _df(df, pwd->b[5], pws->b[5], \
5733 pwd->b[6] = msa_ ## func ## _df(df, pwd->b[6], pws->b[6], \
5735 pwd->b[7] = msa_ ## func ## _df(df, pwd->b[7], pws->b[7], \
5737 pwd->b[8] = msa_ ## func ## _df(df, pwd->b[8], pws->b[8], \
5739 pwd->b[9] = msa_ ## func ## _df(df, pwd->b[9], pws->b[9], \
5741 pwd->b[10] = msa_ ## func ## _df(df, pwd->b[10], pws->b[10], \
5743 pwd->b[11] = msa_ ## func ## _df(df, pwd->b[11], pws->b[11], \
5745 pwd->b[12] = msa_ ## func ## _df(df, pwd->b[12], pws->b[12], \
5747 pwd->b[13] = msa_ ## func ## _df(df, pwd->b[13], pws->b[13], \
5749 pwd->b[14] = msa_ ## func ## _df(df, pwd->b[14], pws->b[14], \
5751 pwd->b[15] = msa_ ## func ## _df(df, pwd->b[15], pws->b[15], \
5755 pwd->h[0] = msa_ ## func ## _df(df, pwd->h[0], pws->h[0], pwt->h[0]); \
5756 pwd->h[1] = msa_ ## func ## _df(df, pwd->h[1], pws->h[1], pwt->h[1]); \
5757 pwd->h[2] = msa_ ## func ## _df(df, pwd->h[2], pws->h[2], pwt->h[2]); \
5758 pwd->h[3] = msa_ ## func ## _df(df, pwd->h[3], pws->h[3], pwt->h[3]); \
5759 pwd->h[4] = msa_ ## func ## _df(df, pwd->h[4], pws->h[4], pwt->h[4]); \
5760 pwd->h[5] = msa_ ## func ## _df(df, pwd->h[5], pws->h[5], pwt->h[5]); \
5761 pwd->h[6] = msa_ ## func ## _df(df, pwd->h[6], pws->h[6], pwt->h[6]); \
5762 pwd->h[7] = msa_ ## func ## _df(df, pwd->h[7], pws->h[7], pwt->h[7]); \
5765 pwd->w[0] = msa_ ## func ## _df(df, pwd->w[0], pws->w[0], pwt->w[0]); \
5766 pwd->w[1] = msa_ ## func ## _df(df, pwd->w[1], pws->w[1], pwt->w[1]); \
5767 pwd->w[2] = msa_ ## func ## _df(df, pwd->w[2], pws->w[2], pwt->w[2]); \
5768 pwd->w[3] = msa_ ## func ## _df(df, pwd->w[3], pws->w[3], pwt->w[3]); \
5771 pwd->d[0] = msa_ ## func ## _df(df, pwd->d[0], pws->d[0], pwt->d[0]); \
5772 pwd->d[1] = msa_ ## func ## _df(df, pwd->d[1], pws->d[1], pwt->d[1]); \
5787 static inline void msa_splat_df(uint32_t df, wr_t *pwd, in MSA_TEROP_DF()
5790 uint32_t n = rt % DF_ELEMENTS(df); in MSA_TEROP_DF()
5793 switch (df) { in MSA_TEROP_DF()
5819 void helper_msa_splat_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_splat_df() argument
5825 msa_splat_df(df, pwd, pws, env->active_tc.gpr[rt]); in helper_msa_splat_df()
5851 void helper_msa_##FUNC(CPUMIPSState *env, uint32_t df, uint32_t wd, \
5859 switch (df) { \
5897 uint32_t n = DF_ELEMENTS(df); \
5908 void helper_msa_sldi_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in MSA_FN_DF()
5914 msa_sld_df(df, pwd, pws, n); in MSA_FN_DF()
5917 void helper_msa_splati_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_splati_df() argument
5923 msa_splat_df(df, pwd, pws, n); in helper_msa_splati_df()
6074 void helper_msa_insve_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_insve_df() argument
6080 switch (df) { in helper_msa_insve_df()
6126 void helper_msa_fill_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fill_df() argument
6132 switch (df) { in helper_msa_fill_df()
6549 wr_t *pwt, uint32_t df, int quiet, in compare_af() argument
6557 switch (df) { in compare_af()
6578 wr_t *pwt, uint32_t df, int quiet, in compare_un() argument
6586 switch (df) { in compare_un()
6609 wr_t *pwt, uint32_t df, int quiet, in compare_eq() argument
6617 switch (df) { in compare_eq()
6638 wr_t *pwt, uint32_t df, int quiet, in compare_ueq() argument
6646 switch (df) { in compare_ueq()
6667 wr_t *pwt, uint32_t df, int quiet, in compare_lt() argument
6675 switch (df) { in compare_lt()
6696 wr_t *pwt, uint32_t df, int quiet, in compare_ult() argument
6704 switch (df) { in compare_ult()
6725 wr_t *pwt, uint32_t df, int quiet, in compare_le() argument
6733 switch (df) { in compare_le()
6754 wr_t *pwt, uint32_t df, int quiet, in compare_ule() argument
6762 switch (df) { in compare_ule()
6783 wr_t *pwt, uint32_t df, int quiet, in compare_or() argument
6791 switch (df) { in compare_or()
6812 wr_t *pwt, uint32_t df, int quiet, in compare_une() argument
6820 switch (df) { in compare_une()
6841 wr_t *pwt, uint32_t df, int quiet, in compare_ne() argument
6849 switch (df) { in compare_ne()
6869 void helper_msa_fcaf_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcaf_df() argument
6875 compare_af(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcaf_df()
6878 void helper_msa_fcun_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcun_df() argument
6884 compare_un(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcun_df()
6887 void helper_msa_fceq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fceq_df() argument
6893 compare_eq(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fceq_df()
6896 void helper_msa_fcueq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcueq_df() argument
6902 compare_ueq(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcueq_df()
6905 void helper_msa_fclt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fclt_df() argument
6911 compare_lt(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fclt_df()
6914 void helper_msa_fcult_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcult_df() argument
6920 compare_ult(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcult_df()
6923 void helper_msa_fcle_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcle_df() argument
6929 compare_le(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcle_df()
6932 void helper_msa_fcule_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcule_df() argument
6938 compare_ule(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcule_df()
6941 void helper_msa_fsaf_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsaf_df() argument
6947 compare_af(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsaf_df()
6950 void helper_msa_fsun_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsun_df() argument
6956 compare_un(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsun_df()
6959 void helper_msa_fseq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fseq_df() argument
6965 compare_eq(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fseq_df()
6968 void helper_msa_fsueq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsueq_df() argument
6974 compare_ueq(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsueq_df()
6977 void helper_msa_fslt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fslt_df() argument
6983 compare_lt(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fslt_df()
6986 void helper_msa_fsult_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsult_df() argument
6992 compare_ult(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsult_df()
6995 void helper_msa_fsle_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsle_df() argument
7001 compare_le(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsle_df()
7004 void helper_msa_fsule_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsule_df() argument
7010 compare_ule(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsule_df()
7013 void helper_msa_fcor_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcor_df() argument
7019 compare_or(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcor_df()
7022 void helper_msa_fcune_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcune_df() argument
7028 compare_une(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcune_df()
7031 void helper_msa_fcne_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fcne_df() argument
7037 compare_ne(env, pwd, pws, pwt, df, 1, GETPC()); in helper_msa_fcne_df()
7040 void helper_msa_fsor_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsor_df() argument
7046 compare_or(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsor_df()
7049 void helper_msa_fsune_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsune_df() argument
7055 compare_une(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsune_df()
7058 void helper_msa_fsne_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsne_df() argument
7064 compare_ne(env, pwd, pws, pwt, df, 0, GETPC()); in helper_msa_fsne_df()
7088 void helper_msa_fadd_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fadd_df() argument
7099 switch (df) { in helper_msa_fadd_df()
7118 void helper_msa_fsub_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsub_df() argument
7129 switch (df) { in helper_msa_fsub_df()
7148 void helper_msa_fmul_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmul_df() argument
7159 switch (df) { in helper_msa_fmul_df()
7179 void helper_msa_fdiv_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fdiv_df() argument
7190 switch (df) { in helper_msa_fdiv_df()
7224 void helper_msa_fmadd_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmadd_df() argument
7235 switch (df) { in helper_msa_fmadd_df()
7257 void helper_msa_fmsub_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmsub_df() argument
7268 switch (df) { in helper_msa_fmsub_df()
7292 void helper_msa_fexp2_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fexp2_df() argument
7303 switch (df) { in helper_msa_fexp2_df()
7343 void helper_msa_fexdo_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fexdo_df() argument
7354 switch (df) { in helper_msa_fexdo_df()
7396 void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ftq_df() argument
7407 switch (df) { in helper_msa_ftq_df()
7465 void helper_msa_fmin_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmin_df() argument
7476 if (df == DF_WORD) { in helper_msa_fmin_df()
7510 } else if (df == DF_DOUBLE) { in helper_msa_fmin_df()
7539 void helper_msa_fmin_a_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmin_a_df() argument
7550 if (df == DF_WORD) { in helper_msa_fmin_a_df()
7555 } else if (df == DF_DOUBLE) { in helper_msa_fmin_a_df()
7567 void helper_msa_fmax_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmax_df() argument
7578 if (df == DF_WORD) { in helper_msa_fmax_df()
7612 } else if (df == DF_DOUBLE) { in helper_msa_fmax_df()
7641 void helper_msa_fmax_a_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fmax_a_df() argument
7652 if (df == DF_WORD) { in helper_msa_fmax_a_df()
7657 } else if (df == DF_DOUBLE) { in helper_msa_fmax_a_df()
7669 void helper_msa_fclass_df(CPUMIPSState *env, uint32_t df, in helper_msa_fclass_df() argument
7676 if (df == DF_WORD) { in helper_msa_fclass_df()
7681 } else if (df == DF_DOUBLE) { in helper_msa_fclass_df()
7705 void helper_msa_ftrunc_s_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ftrunc_s_df() argument
7715 switch (df) { in helper_msa_ftrunc_s_df()
7735 void helper_msa_ftrunc_u_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ftrunc_u_df() argument
7745 switch (df) { in helper_msa_ftrunc_u_df()
7765 void helper_msa_fsqrt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fsqrt_df() argument
7775 switch (df) { in helper_msa_fsqrt_df()
7812 void helper_msa_frsqrt_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_frsqrt_df() argument
7822 switch (df) { in helper_msa_frsqrt_df()
7844 void helper_msa_frcp_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_frcp_df() argument
7854 switch (df) { in helper_msa_frcp_df()
7874 void helper_msa_frint_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_frint_df() argument
7884 switch (df) { in helper_msa_frint_df()
7928 void helper_msa_flog2_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_flog2_df() argument
7938 switch (df) { in helper_msa_flog2_df()
7958 void helper_msa_fexupl_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fexupl_df() argument
7968 switch (df) { in helper_msa_fexupl_df()
7994 void helper_msa_fexupr_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_fexupr_df() argument
8004 switch (df) { in helper_msa_fexupr_df()
8030 void helper_msa_ffql_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ffql_df() argument
8038 switch (df) { in helper_msa_ffql_df()
8056 void helper_msa_ffqr_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ffqr_df() argument
8064 switch (df) { in helper_msa_ffqr_df()
8082 void helper_msa_ftint_s_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ftint_s_df() argument
8092 switch (df) { in helper_msa_ftint_s_df()
8112 void helper_msa_ftint_u_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ftint_u_df() argument
8122 switch (df) { in helper_msa_ftint_u_df()
8148 void helper_msa_ffint_s_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ffint_s_df() argument
8158 switch (df) { in helper_msa_ffint_s_df()
8178 void helper_msa_ffint_u_df(CPUMIPSState *env, uint32_t df, uint32_t wd, in helper_msa_ffint_u_df() argument
8188 switch (df) { in helper_msa_ffint_u_df()
8209 #define DF_BITS(df) (1 << ((df) + 3)) argument
8212 #define DF_ELEMENTS(df) (MSA_WRLEN / DF_BITS(df)) argument