diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-02-10 11:28:56 +0000 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-02-10 18:28:09 +0100 |
commit | bb4d4bb376c6ae4d2dfa6e59dfa4e87a75d3a672 (patch) | |
tree | 38b1c3f69f028c82493d0117a8ec854451af838a /target-arm/helper.c | |
parent | d1a1eb7472b40950dac176a191f3d5d4ae980ecc (diff) |
softfloat: Add float16 type and float16 NaN handling functions
Add a float16 type to softfloat, rather than using bits16 directly.
Also add the missing functions float16_is_quiet_nan(),
float16_is_signaling_nan() and float16_maybe_silence_nan(),
which are needed for the float16 conversion routines.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r-- | target-arm/helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index d46defc118..d29c42b3f4 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2627,14 +2627,14 @@ float32 HELPER(vfp_fcvt_f16_to_f32)(uint32_t a, CPUState *env) { float_status *s = &env->vfp.fp_status; int ieee = (env->vfp.xregs[ARM_VFP_FPSCR] & (1 << 26)) == 0; - return float16_to_float32(a, ieee, s); + return float16_to_float32(make_float16(a), ieee, s); } uint32_t HELPER(vfp_fcvt_f32_to_f16)(float32 a, CPUState *env) { float_status *s = &env->vfp.fp_status; int ieee = (env->vfp.xregs[ARM_VFP_FPSCR] & (1 << 26)) == 0; - return float32_to_float16(a, ieee, s); + return float16_val(float32_to_float16(a, ieee, s)); } float32 HELPER(recps_f32)(float32 a, float32 b, CPUState *env) |