]> Git Repo - qemu.git/commitdiff
arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16
authorAlex Bennée <[email protected]>
Thu, 1 Mar 2018 11:05:55 +0000 (11:05 +0000)
committerPeter Maydell <[email protected]>
Thu, 1 Mar 2018 11:13:59 +0000 (11:13 +0000)
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: 20180227143852[email protected]
Signed-off-by: Peter Maydell <[email protected]>
target/arm/helper-a64.c
target/arm/helper-a64.h
target/arm/translate-a64.c

index 92a0d55a9c8f4307274d0b97fa52bb87a1e7384c..afb25ad20c0ef576b622fe803eb0b848193a85ce 100644 (file)
@@ -828,3 +828,16 @@ uint32_t HELPER(advsimd_f16touinth)(float16 a, void *fpstp)
     }
     return float16_to_uint16(a, fpst);
 }
+
+/*
+ * Square Root and Reciprocal square root
+ */
+
+float16 HELPER(sqrt_f16)(float16 a, void *fpstp)
+{
+    float_status *s = fpstp;
+
+    return float16_sqrt(a, s);
+}
+
+
index 339323fc3ddac8b82434ded12fd10b4f6c9e837e..ef4ddfe9d81f20a42fb6b74f461870f21c907cce 100644 (file)
@@ -80,3 +80,4 @@ DEF_HELPER_2(advsimd_rinth_exact, f16, f16, ptr)
 DEF_HELPER_2(advsimd_rinth, f16, f16, ptr)
 DEF_HELPER_2(advsimd_f16tosinth, i32, f16, ptr)
 DEF_HELPER_2(advsimd_f16touinth, i32, f16, ptr)
+DEF_HELPER_2(sqrt_f16, f16, f16, ptr)
index 715dc4333d03217114544de7285855b85d45694d..1096ff48acc8194b7aad0e6e5b11329e4b945f3b 100644 (file)
@@ -11388,6 +11388,8 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn)
     case 0x6f: /* FNEG */
         need_fpst = false;
         break;
+    case 0x7f: /* FSQRT (vector) */
+        break;
     default:
         fprintf(stderr, "%s: insn %#04x fpop %#2x\n", __func__, insn, fpop);
         g_assert_not_reached();
@@ -11502,6 +11504,9 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn)
             case 0x6f: /* FNEG */
                 tcg_gen_xori_i32(tcg_res, tcg_op, 0x8000);
                 break;
+            case 0x7f: /* FSQRT */
+                gen_helper_sqrt_f16(tcg_res, tcg_op, tcg_fpstatus);
+                break;
             default:
                 g_assert_not_reached();
             }
This page took 0.04456 seconds and 4 git commands to generate.