qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] target/i386: Emulate ftz and denormal flag bits correctly
@ 2025-02-13 14:26 Peter Maydell
  2025-02-13 14:26 ` [PATCH 1/4] target/i386: Detect flush-to-zero after rounding Peter Maydell
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Peter Maydell @ 2025-02-13 14:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Paolo Bonzini, Zhao Liu, Eduardo Habkost

This is a set of four patches to target/i386 which use the core
fpu functionality we just landed for Arm FEAT_AFP to correct
the emulation of some corner cases of x86 floating point:
 * when we are flushing denormal outputs to zero, this should
   be done after rounding, not before
 * the MXCSR.DE and FPUS.DE bits indicate when a denormal input
   was not flushed and was used in an fp operation; we previously
   weren't implementing these semantics

All four patches have been reviewed by RTH. Testing is a bit
light (make check-tcg and make check-functional), because AFAIK
there is no freely available comprehensive FP testsuite for x86,
and risu doesn't support x86 currently so I can't do the same kind
of random-instruction-testing I could for Arm.

thanks
-- PMM

Peter Maydell (4):
  target/i386: Detect flush-to-zero after rounding
  target/i386: Use correct type for get_float_exception_flags() values
  target/i386: Wire up MXCSR.DE and FPUS.DE correctly
  tests/tcg/x86_64/fma: add test for exact-denormal output

 target/i386/ops_sse.h        |  16 +++---
 target/i386/tcg/fpu_helper.c | 101 +++++++++++++++++------------------
 tests/tcg/x86_64/fma.c       |  17 ++++--
 3 files changed, 68 insertions(+), 66 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2025-05-08  3:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 14:26 [PATCH 0/4] target/i386: Emulate ftz and denormal flag bits correctly Peter Maydell
2025-02-13 14:26 ` [PATCH 1/4] target/i386: Detect flush-to-zero after rounding Peter Maydell
2025-05-07 13:10   ` Zhao Liu
2025-02-13 14:26 ` [PATCH 2/4] target/i386: Use correct type for get_float_exception_flags() values Peter Maydell
2025-02-13 15:18   ` Philippe Mathieu-Daudé
2025-05-07 13:12   ` Zhao Liu
2025-02-13 14:26 ` [PATCH 3/4] target/i386: Wire up MXCSR.DE and FPUS.DE correctly Peter Maydell
2025-05-08  3:48   ` Zhao Liu
2025-02-13 14:26 ` [PATCH 4/4] tests/tcg/x86_64/fma: add test for exact-denormal output Peter Maydell
2025-05-08  3:48   ` Zhao Liu
2025-02-24 14:47 ` [PATCH 0/4] target/i386: Emulate ftz and denormal flag bits correctly Peter Maydell
2025-03-07 10:38   ` Peter Maydell
2025-03-12 13:22     ` Peter Maydell
2025-04-29 12:30       ` Peter Maydell

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).