On 2/25/22 11:09, matheus.fe...@eldorado.org.br wrote:
+void helper_XVCVSPBF16(CPUPPCState *env, ppc_vsr_t *xt, ppc_vsr_t *xb)
+{
+    ppc_vsr_t t = { };
+    int i, status;
+
+    for (i = 0; i < 4; i++) {
+        t.VsrH(2 * i + 1) = float32_to_bfloat16(xb->VsrW(i), &env->fp_status);
+    }
+
+    status = get_float_exception_flags(&env->fp_status);
+    if (unlikely(status & float_flag_invalid_snan)) {
+        float_invalid_op_vxsnan(env, GETPC());
+    }
+
+    *xt = t;
+    do_float_check_status(env, GETPC());
+}

Missing reset_fpstatus.  Otherwise.

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~


PS: Which is reminding me that cleaning that up has been on the to-do list for a long time. We should be able to rely on env->fp_status.float_exception_flags being 0 between and at the start of each fp operation. In do_float_check_status, we would reset float_exception_flags in the expected unlikely case that it is ever non-zero.

Reply via email to