mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/arm: Implement VFP fp16 for VABS, VNEG, VSQRT
Implement VFP fp16 for VABS, VNEG and VSQRT. This is all the fp16 insns that use the DO_VFP_2OP macro, because there is no fp16 version of VMOV_reg. Notes: * the gen_helper_vfp_negh already exists as we needed to create it for the fp16 multiply-add insns * as usual we need to use the f16 version of the fp_status; this is only relevant for VSQRT Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200828183354.27913-9-peter.maydell@linaro.org
This commit is contained in:
parent
009a07335b
commit
ce2d65a5d1
4 changed files with 55 additions and 0 deletions
|
@ -276,6 +276,11 @@ float64 VFP_HELPER(neg, d)(float64 a)
|
|||
return float64_chs(a);
|
||||
}
|
||||
|
||||
dh_ctype_f16 VFP_HELPER(abs, h)(dh_ctype_f16 a)
|
||||
{
|
||||
return float16_abs(a);
|
||||
}
|
||||
|
||||
float32 VFP_HELPER(abs, s)(float32 a)
|
||||
{
|
||||
return float32_abs(a);
|
||||
|
@ -286,6 +291,11 @@ float64 VFP_HELPER(abs, d)(float64 a)
|
|||
return float64_abs(a);
|
||||
}
|
||||
|
||||
dh_ctype_f16 VFP_HELPER(sqrt, h)(dh_ctype_f16 a, CPUARMState *env)
|
||||
{
|
||||
return float16_sqrt(a, &env->vfp.fp_status_f16);
|
||||
}
|
||||
|
||||
float32 VFP_HELPER(sqrt, s)(float32 a, CPUARMState *env)
|
||||
{
|
||||
return float32_sqrt(a, &env->vfp.fp_status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue