|
From: | Richard Henderson |
Subject: | Re: [PATCH v5 46/49] target/ppc: Implement xvcvbf16spn and xvcvspbf16 instructions |
Date: | Fri, 25 Feb 2022 12:17:10 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 2/25/22 11:09, matheus.ferst@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.henderson@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.
[Prev in Thread] | Current Thread | [Next in Thread] |