All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Floating-point OE/UE exception bug
@ 2022-08-05 14:15 Lucas Mateus Castro(alqotel)
  2022-08-05 14:15 ` [PATCH 1/2] fpu: Add rebias bool, value and operation Lucas Mateus Castro(alqotel)
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Lucas Mateus Castro(alqotel) @ 2022-08-05 14:15 UTC (permalink / raw)
  To: qemu-ppc, qemu-devel
  Cc: richard.henderson, danielhb413, Lucas Mateus Castro (alqotel)

From: "Lucas Mateus Castro (alqotel)" <lucas.araujo@eldorado.org.br>

Changes in v2:
    - Completely reworked the solution:
        * Created re_bias in FloatFmt, it is 3/4 of the total exponent
          range of a FP type
        * Added rebias bools that dictates if the result should have
          its exponent add/subtract the re_bias value if an
          overflow/underflow occurs.
        * ppc_store_fpscr sets/unsets rebias if OE/UE is set/unset

The PowerISA defines that if an overflow exception happen with FPSCR.OE
set, the exponent of the intermediate result is subtracted 1536 in
double precision operations and is added 1536 in an underflow exception,
currently this behavior is not QEMU's behavior, this patch series fixes
that.

Currently there's no test in this patch series as there's no way to
disable MSR.FE0 and MSR.FE1 in linux user, so any overflow/underflow
exception with OE/UE set causes a trapping exception.

Lucas Mateus Castro (alqotel) (2):
  fpu: Add rebias bool, value and operation
  target/ppc: Bugfix FP when OE/UE are set

 fpu/softfloat-parts.c.inc     | 21 +++++++++++++++++++--
 fpu/softfloat.c               |  2 ++
 include/fpu/softfloat-types.h |  4 ++++
 target/ppc/cpu.c              |  2 ++
 target/ppc/fpu_helper.c       |  2 --
 5 files changed, 27 insertions(+), 4 deletions(-)

-- 
2.31.1



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

end of thread, other threads:[~2022-08-05 17:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 14:15 [PATCH 0/2] Floating-point OE/UE exception bug Lucas Mateus Castro(alqotel)
2022-08-05 14:15 ` [PATCH 1/2] fpu: Add rebias bool, value and operation Lucas Mateus Castro(alqotel)
2022-08-05 17:13   ` Richard Henderson
2022-08-05 14:15 ` [PATCH 2/2] target/ppc: Bugfix FP when OE/UE are set Lucas Mateus Castro(alqotel)
2022-08-05 17:17   ` Richard Henderson
2022-08-05 17:26     ` Daniel Henrique Barboza
2022-08-05 16:20 ` [PATCH 0/2] Floating-point OE/UE exception bug Alex Bennée
2022-08-05 17:00   ` Lucas Mateus Martins Araujo e Castro
2022-08-05 17:02 ` Lucas Mateus Martins Araujo e Castro
2022-08-05 17:06 ` Richard Henderson
2022-08-05 17:27 ` Daniel Henrique Barboza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.