mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/arm: Implement VFP fp16 VCMP
Implement fp16 version of VCMP. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200828183354.27913-11-peter.maydell@linaro.org
This commit is contained in:
parent
28c28728e5
commit
1b88b054c5
4 changed files with 51 additions and 7 deletions
|
@ -330,19 +330,20 @@ static void softfloat_to_vfp_compare(CPUARMState *env, FloatRelation cmp)
|
|||
}
|
||||
|
||||
/* XXX: check quiet/signaling case */
|
||||
#define DO_VFP_cmp(p, type) \
|
||||
void VFP_HELPER(cmp, p)(type a, type b, CPUARMState *env) \
|
||||
#define DO_VFP_cmp(P, FLOATTYPE, ARGTYPE, FPST) \
|
||||
void VFP_HELPER(cmp, P)(ARGTYPE a, ARGTYPE b, CPUARMState *env) \
|
||||
{ \
|
||||
softfloat_to_vfp_compare(env, \
|
||||
type ## _compare_quiet(a, b, &env->vfp.fp_status)); \
|
||||
FLOATTYPE ## _compare_quiet(a, b, &env->vfp.FPST)); \
|
||||
} \
|
||||
void VFP_HELPER(cmpe, p)(type a, type b, CPUARMState *env) \
|
||||
void VFP_HELPER(cmpe, P)(ARGTYPE a, ARGTYPE b, CPUARMState *env) \
|
||||
{ \
|
||||
softfloat_to_vfp_compare(env, \
|
||||
type ## _compare(a, b, &env->vfp.fp_status)); \
|
||||
FLOATTYPE ## _compare(a, b, &env->vfp.FPST)); \
|
||||
}
|
||||
DO_VFP_cmp(s, float32)
|
||||
DO_VFP_cmp(d, float64)
|
||||
DO_VFP_cmp(h, float16, dh_ctype_f16, fp_status_f16)
|
||||
DO_VFP_cmp(s, float32, float32, fp_status)
|
||||
DO_VFP_cmp(d, float64, float64, fp_status)
|
||||
#undef DO_VFP_cmp
|
||||
|
||||
/* Integer to float and float to integer conversions */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue