mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/arm: Implement fp16 for Neon VRECPS
Convert the Neon VRECPS insn to using a gvec helper, and use this to implement the fp16 case. The phrasing of the new float32_recps_nf() is slightly different from the old recps_f32() so that it parallels the f16 version; for f16 we can't assume that flush-to-zero is always enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200828183354.27913-34-peter.maydell@linaro.org
This commit is contained in:
parent
635187aaa9
commit
ac8c62c4e5
4 changed files with 35 additions and 34 deletions
|
@ -529,19 +529,6 @@ uint32_t HELPER(vfp_fcvt_f64_to_f16)(float64 a, void *fpstp, uint32_t ahp_mode)
|
|||
return r;
|
||||
}
|
||||
|
||||
float32 HELPER(recps_f32)(CPUARMState *env, float32 a, float32 b)
|
||||
{
|
||||
float_status *s = &env->vfp.standard_fp_status;
|
||||
if ((float32_is_infinity(a) && float32_is_zero_or_denormal(b)) ||
|
||||
(float32_is_infinity(b) && float32_is_zero_or_denormal(a))) {
|
||||
if (!(float32_is_zero(a) || float32_is_zero(b))) {
|
||||
float_raise(float_flag_input_denormal, s);
|
||||
}
|
||||
return float32_two;
|
||||
}
|
||||
return float32_sub(float32_two, float32_mul(a, b, s), s);
|
||||
}
|
||||
|
||||
float32 HELPER(rsqrts_f32)(CPUARMState *env, float32 a, float32 b)
|
||||
{
|
||||
float_status *s = &env->vfp.standard_fp_status;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue