From: Richard Henderson <richard.henderson@linaro.org>
To: "Víctor Colombo" <victor.colombo@eldorado.org.br>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: clg@kaod.org, danielhb413@gmail.com, david@gibson.dropbear.id.au,
groug@kaod.org
Subject: Re: [RFC PATCH 1/2] target/ppc: Add invalid imz, isi and snan to do_float_check_status()
Date: Thu, 12 May 2022 16:01:26 -0700 [thread overview]
Message-ID: <7759c450-1003-83db-e276-30cb3fad9e44@linaro.org> (raw)
In-Reply-To: <20220512194250.138244-2-victor.colombo@eldorado.org.br>
On 5/12/22 12:42, Víctor Colombo wrote:
> Make do_float_check_status also handle some invalid exceptions:
> imz, isi and snan.
>
> The idea is to try to concentrate the handling of all fp exceptions in
> do_float_check_status. For this RFC, move only the 3 exceptions stated
> above.
>
> I chose to create new '*_defer' helpers to propose a gradual transition
> for the instructions helpers. The 'defer' comes from the idea that the
> exception raising is defered to be called somewhere else, as oposed of
> what is being done in the original, 'non-defered' functions, which
> immediatly call raise_exception_err_ra().
This is not correct.
You need to go through section 4.4 "Floating-point excepions" and note what happens when
each exception is enabled (e.g. VE=1):
(1) Do not modify the FPR,
(2) Do or do not modify FR, FI, FPRF.
The mechanism by which we avoid setting the FPR is to to raise an exception before
returning from the helper performing the operation.
I believe it's mostly invalid and divbyzero that avoid setting results, while overflow,
underflow, inexact do.
r~
next prev parent reply other threads:[~2022-05-12 23:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 19:42 [RFC PATCH 0/2] target/ppc: Propose rework in fp exception handling Víctor Colombo
2022-05-12 19:42 ` [RFC PATCH 1/2] target/ppc: Add invalid imz, isi and snan to do_float_check_status() Víctor Colombo
2022-05-12 23:01 ` Richard Henderson [this message]
2022-05-12 19:42 ` [RFC PATCH 2/2] target/ppc: Rely on do_float_check_status for VSX_MADD invalid excepts Víctor Colombo
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=7759c450-1003-83db-e276-30cb3fad9e44@linaro.org \
--to=richard.henderson@linaro.org \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=victor.colombo@eldorado.org.br \
/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 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.