qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Lucas Mateus Castro(alqotel)" <lucas.araujo@eldorado.org.br>
Cc: qemu-ppc@nongnu.org, richard.henderson@linaro.org,
	danielhb413@gmail.com, qemu-devel@nongnu.org
Subject: Re: [PATCH 0/2] Floating-point OE/UE exception bug
Date: Fri, 05 Aug 2022 17:20:08 +0100	[thread overview]
Message-ID: <87pmhemzh9.fsf@linaro.org> (raw)
In-Reply-To: <20220805141522.412864-1-lucas.araujo@eldorado.org.br>


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

> 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

I thought this might have an effect on the efficiency of the FloatFmt
extraction/packing but I couldn't see any real difference in fpbench. I
doubt the compiler can dead code it away if not used by a front-end.

Anyway have a:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

for the series.

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

Could you do it with a system mode test? Probably overkill for this
though. I suspect tweaking testfloat would be tricky.

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


-- 
Alex Bennée


  parent reply	other threads:[~2022-08-05 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Alex Bennée [this message]
2022-08-05 17:00   ` [PATCH 0/2] Floating-point OE/UE exception bug 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmhemzh9.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=danielhb413@gmail.com \
    --cc=lucas.araujo@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).