qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/sparc: don't set FSR_NVA when comparing unordered floats
@ 2025-04-25  9:35 Clément Chigot
  2025-05-11 11:56 ` Mark Cave-Ayland
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Clément Chigot @ 2025-04-25  9:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: atar4qemu, mark.cave-ayland, Clément Chigot

FSR_NVA should be set when one of the operands is a signaling NaN or
when using FCMPEx instructions. But those cases are already handled
within check_ieee_exception or floatxx_compare functions.
Otherwise, it should be left untouched.

FTR, this was detected by inf-compare-[5678] tests within gcc
testsuites.

Signed-off-by: Clément Chigot <chigot@adacore.com>
---
 target/sparc/fop_helper.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/sparc/fop_helper.c b/target/sparc/fop_helper.c
index c25097d07f..b57da7c9ea 100644
--- a/target/sparc/fop_helper.c
+++ b/target/sparc/fop_helper.c
@@ -446,7 +446,6 @@ static uint32_t finish_fcmp(CPUSPARCState *env, FloatRelation r, uintptr_t ra)
     case float_relation_greater:
         return 2;
     case float_relation_unordered:
-        env->fsr |= FSR_NVA;
         return 3;
     }
     g_assert_not_reached();
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-27 19:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25  9:35 [PATCH] target/sparc: don't set FSR_NVA when comparing unordered floats Clément Chigot
2025-05-11 11:56 ` Mark Cave-Ayland
2025-05-11 20:43 ` Richard Henderson
2025-05-27 19:22 ` Mark Cave-Ayland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).