All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Víctor Colombo" <victor.colombo@eldorado.org.br>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: clg@kaod.org, danielhb413@gmail.com, david@gibson.dropbear.id.au,
	groug@kaod.org, richard.henderson@linaro.org,
	victor.colombo@eldorado.org.br
Subject: [RFC PATCH 0/2] target/ppc: Propose rework in fp exception handling
Date: Thu, 12 May 2022 16:42:48 -0300	[thread overview]
Message-ID: <20220512194250.138244-1-victor.colombo@eldorado.org.br> (raw)

Hello everyone!

I would like to propose a rework on the fpscr exceptions in
fpu_helper.c. Today, we have: do_float_check_status() dealing with
Overflow, Underflow, and Inexact; and other helpers for the invalid
exceptions (like float_invalid_op_vximz(), float_invalid_op_vxisi()),
including some special cases like float_invalid_op_madd(). So, there is
a lot of helpers that may need to be used in the insn helpers code.

My idea is try to find a way to concentrate them in a single place.
This RFC moves imz, isi, and snan excp helpers to do_float_check_status
as a hub for dealing with the commitment of exception flags from
env->fp_status to env->fpscr. Then, show how an instruction could
benefit of this change by adapting VSX_MADD helper to leverage the
changes.

The main objectives with this patch set are:
1. Try to simplify the excp handling code.
2. Allow for MMA instruction XVFGER to be easily implemented
   (see [1])

This RFC is just a subset of what I think should be done. There are
more exceptions to be moved to do_float_check_status, and many more
instructions to refactor to use it.

Thanks!

Based-on the FI bit fix [2].

[1] https://lists.gnu.org/archive/html/qemu-ppc/2022-05/msg00176.html
[2] <20220510204610.100867-1-victor.colombo@eldorado.org.br>
    https://lists.nongnu.org/archive/html/qemu-ppc/2022-05/msg00246.html
    https://patchew.org/QEMU/20220510204610.100867-1-victor.colombo@eldorado.org.br/

Víctor Colombo (2):
  target/ppc: Add invalid imz, isi and snan to do_float_check_status()
  target/ppc: Rely on do_float_check_status for VSX_MADD invalid excepts

 target/ppc/fpu_helper.c | 148 ++++++++++++++++++++++++++--------------
 1 file changed, 97 insertions(+), 51 deletions(-)

-- 
2.25.1



             reply	other threads:[~2022-05-12 19:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 19:42 Víctor Colombo [this message]
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
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=20220512194250.138244-1-victor.colombo@eldorado.org.br \
    --to=victor.colombo@eldorado.org.br \
    --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=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 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.