diff --git a/qemu/aarch64.h b/qemu/aarch64.h index 82227874..df398a67 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_aarch64 #define helper_gvec_fmax_s helper_gvec_fmax_s_aarch64 #define helper_gvec_fmin_h helper_gvec_fmin_h_aarch64 +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_aarch64 +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_aarch64 #define helper_gvec_fmin_s helper_gvec_fmin_s_aarch64 +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_aarch64 +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_aarch64 #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_aarch64 #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_aarch64 #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_aarch64 diff --git a/qemu/aarch64eb.h b/qemu/aarch64eb.h index 6fd07cba..20661dc5 100644 --- a/qemu/aarch64eb.h +++ b/qemu/aarch64eb.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_aarch64eb #define helper_gvec_fmax_s helper_gvec_fmax_s_aarch64eb #define helper_gvec_fmin_h helper_gvec_fmin_h_aarch64eb +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_aarch64eb +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_aarch64eb #define helper_gvec_fmin_s helper_gvec_fmin_s_aarch64eb +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_aarch64eb +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_aarch64eb #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_aarch64eb #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_aarch64eb #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_aarch64eb diff --git a/qemu/arm.h b/qemu/arm.h index a58eba78..00b0e5ac 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_arm #define helper_gvec_fmax_s helper_gvec_fmax_s_arm #define helper_gvec_fmin_h helper_gvec_fmin_h_arm +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_arm +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_arm #define helper_gvec_fmin_s helper_gvec_fmin_s_arm +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_arm +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_arm #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_arm #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_arm #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_arm diff --git a/qemu/armeb.h b/qemu/armeb.h index cb32c92e..d6e15222 100644 --- a/qemu/armeb.h +++ b/qemu/armeb.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_armeb #define helper_gvec_fmax_s helper_gvec_fmax_s_armeb #define helper_gvec_fmin_h helper_gvec_fmin_h_armeb +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_armeb +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_armeb #define helper_gvec_fmin_s helper_gvec_fmin_s_armeb +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_armeb +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_armeb #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_armeb #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_armeb #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_armeb diff --git a/qemu/header_gen.py b/qemu/header_gen.py index bfff7230..bc08c5c5 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -1296,7 +1296,11 @@ symbols = ( 'helper_gvec_fmax_h', 'helper_gvec_fmax_s', 'helper_gvec_fmin_h', + 'helper_gvec_fmaxnum_h', + 'helper_gvec_fmaxnum_s', 'helper_gvec_fmin_s', + 'helper_gvec_fminnum_h', + 'helper_gvec_fminnum_s', 'helper_gvec_fmla_idx_d', 'helper_gvec_fmla_idx_h', 'helper_gvec_fmla_idx_s', diff --git a/qemu/m68k.h b/qemu/m68k.h index c700e7a1..181d2467 100644 --- a/qemu/m68k.h +++ b/qemu/m68k.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_m68k #define helper_gvec_fmax_s helper_gvec_fmax_s_m68k #define helper_gvec_fmin_h helper_gvec_fmin_h_m68k +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_m68k +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_m68k #define helper_gvec_fmin_s helper_gvec_fmin_s_m68k +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_m68k +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_m68k #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_m68k #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_m68k #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_m68k diff --git a/qemu/mips.h b/qemu/mips.h index 8d761ab3..66039d58 100644 --- a/qemu/mips.h +++ b/qemu/mips.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_mips #define helper_gvec_fmax_s helper_gvec_fmax_s_mips #define helper_gvec_fmin_h helper_gvec_fmin_h_mips +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_mips +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_mips #define helper_gvec_fmin_s helper_gvec_fmin_s_mips +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_mips +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_mips #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_mips #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_mips #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_mips diff --git a/qemu/mips64.h b/qemu/mips64.h index 5e75269d..b1ab0ca9 100644 --- a/qemu/mips64.h +++ b/qemu/mips64.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_mips64 #define helper_gvec_fmax_s helper_gvec_fmax_s_mips64 #define helper_gvec_fmin_h helper_gvec_fmin_h_mips64 +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_mips64 +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_mips64 #define helper_gvec_fmin_s helper_gvec_fmin_s_mips64 +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_mips64 +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_mips64 #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_mips64 #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_mips64 #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_mips64 diff --git a/qemu/mips64el.h b/qemu/mips64el.h index aa6fac7f..67928dca 100644 --- a/qemu/mips64el.h +++ b/qemu/mips64el.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_mips64el #define helper_gvec_fmax_s helper_gvec_fmax_s_mips64el #define helper_gvec_fmin_h helper_gvec_fmin_h_mips64el +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_mips64el +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_mips64el #define helper_gvec_fmin_s helper_gvec_fmin_s_mips64el +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_mips64el +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_mips64el #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_mips64el #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_mips64el #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_mips64el diff --git a/qemu/mipsel.h b/qemu/mipsel.h index 6ec209aa..24fb743c 100644 --- a/qemu/mipsel.h +++ b/qemu/mipsel.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_mipsel #define helper_gvec_fmax_s helper_gvec_fmax_s_mipsel #define helper_gvec_fmin_h helper_gvec_fmin_h_mipsel +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_mipsel +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_mipsel #define helper_gvec_fmin_s helper_gvec_fmin_s_mipsel +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_mipsel +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_mipsel #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_mipsel #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_mipsel #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_mipsel diff --git a/qemu/powerpc.h b/qemu/powerpc.h index 02d3a2c7..d230de9c 100644 --- a/qemu/powerpc.h +++ b/qemu/powerpc.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_powerpc #define helper_gvec_fmax_s helper_gvec_fmax_s_powerpc #define helper_gvec_fmin_h helper_gvec_fmin_h_powerpc +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_powerpc +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_powerpc #define helper_gvec_fmin_s helper_gvec_fmin_s_powerpc +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_powerpc +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_powerpc #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_powerpc #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_powerpc #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_powerpc diff --git a/qemu/riscv32.h b/qemu/riscv32.h index 218a1e9a..655bf190 100644 --- a/qemu/riscv32.h +++ b/qemu/riscv32.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_riscv32 #define helper_gvec_fmax_s helper_gvec_fmax_s_riscv32 #define helper_gvec_fmin_h helper_gvec_fmin_h_riscv32 +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_riscv32 +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_riscv32 #define helper_gvec_fmin_s helper_gvec_fmin_s_riscv32 +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_riscv32 +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_riscv32 #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_riscv32 #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_riscv32 #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_riscv32 diff --git a/qemu/riscv64.h b/qemu/riscv64.h index 258e003f..af45fb60 100644 --- a/qemu/riscv64.h +++ b/qemu/riscv64.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_riscv64 #define helper_gvec_fmax_s helper_gvec_fmax_s_riscv64 #define helper_gvec_fmin_h helper_gvec_fmin_h_riscv64 +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_riscv64 +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_riscv64 #define helper_gvec_fmin_s helper_gvec_fmin_s_riscv64 +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_riscv64 +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_riscv64 #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_riscv64 #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_riscv64 #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_riscv64 diff --git a/qemu/sparc.h b/qemu/sparc.h index 4f057770..9f661bcd 100644 --- a/qemu/sparc.h +++ b/qemu/sparc.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_sparc #define helper_gvec_fmax_s helper_gvec_fmax_s_sparc #define helper_gvec_fmin_h helper_gvec_fmin_h_sparc +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_sparc +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_sparc #define helper_gvec_fmin_s helper_gvec_fmin_s_sparc +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_sparc +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_sparc #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_sparc #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_sparc #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_sparc diff --git a/qemu/sparc64.h b/qemu/sparc64.h index ea332f7a..4119f5e1 100644 --- a/qemu/sparc64.h +++ b/qemu/sparc64.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_sparc64 #define helper_gvec_fmax_s helper_gvec_fmax_s_sparc64 #define helper_gvec_fmin_h helper_gvec_fmin_h_sparc64 +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_sparc64 +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_sparc64 #define helper_gvec_fmin_s helper_gvec_fmin_s_sparc64 +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_sparc64 +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_sparc64 #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_sparc64 #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_sparc64 #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_sparc64 diff --git a/qemu/target/arm/helper.h b/qemu/target/arm/helper.h index 89ea41d1..5622752f 100644 --- a/qemu/target/arm/helper.h +++ b/qemu/target/arm/helper.h @@ -651,6 +651,12 @@ DEF_HELPER_FLAGS_5(gvec_fmax_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_5(gvec_fmin_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_5(gvec_fmin_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5(gvec_fmaxnum_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5(gvec_fmaxnum_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) + +DEF_HELPER_FLAGS_5(gvec_fminnum_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5(gvec_fminnum_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) + DEF_HELPER_FLAGS_5(gvec_ftsmul_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_5(gvec_ftsmul_s, TCG_CALL_NO_RWG, diff --git a/qemu/target/arm/translate-neon.inc.c b/qemu/target/arm/translate-neon.inc.c index b28859df..181aabf0 100644 --- a/qemu/target/arm/translate-neon.inc.c +++ b/qemu/target/arm/translate-neon.inc.c @@ -1170,6 +1170,11 @@ static void gen_VMLS_fp_3s(TCGContext *s, TCGv_i32 vd, TCGv_i32 vn, TCGv_i32 vm, DO_3S_FP(VMLA, gen_VMLA_fp_3s, true) DO_3S_FP(VMLS, gen_VMLS_fp_3s, true) +WRAP_FP_GVEC(gen_VMAXNM_fp32_3s, FPST_STD, gen_helper_gvec_fmaxnum_s) +WRAP_FP_GVEC(gen_VMAXNM_fp16_3s, FPST_STD_F16, gen_helper_gvec_fmaxnum_h) +WRAP_FP_GVEC(gen_VMINNM_fp32_3s, FPST_STD, gen_helper_gvec_fminnum_s) +WRAP_FP_GVEC(gen_VMINNM_fp16_3s, FPST_STD_F16, gen_helper_gvec_fminnum_h) + static bool trans_VMAXNM_fp_3s(DisasContext *s, arg_3same *a) { if (!arm_dc_feature(s, ARM_FEATURE_V8)) { @@ -1177,11 +1182,13 @@ static bool trans_VMAXNM_fp_3s(DisasContext *s, arg_3same *a) } if (a->size != 0) { - /* TODO fp16 support */ - return false; + if (!dc_isar_feature(aa32_fp16_arith, s)) { + return false; + } + return do_3same(s, a, gen_VMAXNM_fp16_3s); } - return do_3same_fp(s, a, gen_helper_vfp_maxnums, false); + return do_3same(s, a, gen_VMAXNM_fp32_3s); } static bool trans_VMINNM_fp_3s(DisasContext *s, arg_3same *a) @@ -1191,11 +1198,13 @@ static bool trans_VMINNM_fp_3s(DisasContext *s, arg_3same *a) } if (a->size != 0) { - /* TODO fp16 support */ - return false; + if (!dc_isar_feature(aa32_fp16_arith, s)) { + return false; + } + return do_3same(s, a, gen_VMINNM_fp16_3s); } - return do_3same_fp(s, a, gen_helper_vfp_minnums, false); + return do_3same(s, a, gen_VMINNM_fp32_3s); } WRAP_ENV_FN(gen_VRECPS_tramp, gen_helper_recps_f32) diff --git a/qemu/target/arm/vec_helper.c b/qemu/target/arm/vec_helper.c index fda7f9fa..71b4b4be 100644 --- a/qemu/target/arm/vec_helper.c +++ b/qemu/target/arm/vec_helper.c @@ -824,6 +824,12 @@ DO_3OP(gvec_fmax_s, float32_max, float32) DO_3OP(gvec_fmin_h, float16_min, float16) DO_3OP(gvec_fmin_s, float32_min, float32) +DO_3OP(gvec_fmaxnum_h, float16_maxnum, float16) +DO_3OP(gvec_fmaxnum_s, float32_maxnum, float32) + +DO_3OP(gvec_fminnum_h, float16_minnum, float16) +DO_3OP(gvec_fminnum_s, float32_minnum, float32) + #ifdef TARGET_AARCH64 DO_3OP(gvec_recps_h, helper_recpsf_f16, float16) diff --git a/qemu/x86_64.h b/qemu/x86_64.h index 22ae69a7..927b7462 100644 --- a/qemu/x86_64.h +++ b/qemu/x86_64.h @@ -1290,7 +1290,11 @@ #define helper_gvec_fmax_h helper_gvec_fmax_h_x86_64 #define helper_gvec_fmax_s helper_gvec_fmax_s_x86_64 #define helper_gvec_fmin_h helper_gvec_fmin_h_x86_64 +#define helper_gvec_fmaxnum_h helper_gvec_fmaxnum_h_x86_64 +#define helper_gvec_fmaxnum_s helper_gvec_fmaxnum_s_x86_64 #define helper_gvec_fmin_s helper_gvec_fmin_s_x86_64 +#define helper_gvec_fminnum_h helper_gvec_fminnum_h_x86_64 +#define helper_gvec_fminnum_s helper_gvec_fminnum_s_x86_64 #define helper_gvec_fmla_idx_d helper_gvec_fmla_idx_d_x86_64 #define helper_gvec_fmla_idx_h helper_gvec_fmla_idx_h_x86_64 #define helper_gvec_fmla_idx_s helper_gvec_fmla_idx_s_x86_64