summaryrefslogtreecommitdiffstats
path: root/target/hexagon/arch.c
diff options
context:
space:
mode:
authorTaylor Simpson2022-02-10 03:15:49 +0100
committerTaylor Simpson2022-03-12 18:14:22 +0100
commit77ccf44453a83e17cc830df700cc072f6bcf6a71 (patch)
treed9a8eb468926fa6f1796833b857b19058e24264a /target/hexagon/arch.c
parentHexagon (target/hexagon) properly set FPINVF bit in sfcmp.uo and dfcmp.uo (diff)
downloadqemu-77ccf44453a83e17cc830df700cc072f6bcf6a71.tar.gz
qemu-77ccf44453a83e17cc830df700cc072f6bcf6a71.tar.xz
qemu-77ccf44453a83e17cc830df700cc072f6bcf6a71.zip
Hexagon (target/hexagon) properly handle denorm in arch_sf_recip_common
The arch_sf_recip_common function was calling float32_getexp which adjusts for denorm, but the we actually need the raw exponent bits. This function is called from 3 instructions sfrecipa sffixupn sffixupd Test cases added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Message-Id: <20220210021556.9217-6-tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hexagon/arch.c')
-rw-r--r--target/hexagon/arch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/hexagon/arch.c b/target/hexagon/arch.c
index 68a55b3bd4..da79b41c4d 100644
--- a/target/hexagon/arch.c
+++ b/target/hexagon/arch.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
+ * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -298,8 +298,8 @@ int arch_sf_recip_common(float32 *Rs, float32 *Rt, float32 *Rd, int *adjust,
} else {
PeV = 0x00;
/* Basic checks passed */
- n_exp = float32_getexp(RsV);
- d_exp = float32_getexp(RtV);
+ n_exp = float32_getexp_raw(RsV);
+ d_exp = float32_getexp_raw(RtV);
if ((n_exp - d_exp + SF_BIAS) <= SF_MANTBITS) {
/* Near quotient underflow / inexact Q */
PeV = 0x80;