qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] Alternative softfloat 128-bit integer support
@ 2022-03-30 17:59 matheus.ferst
  2022-03-30 17:59 ` [RFC PATCH 1/8] qemu/int128: avoid undefined behavior in int128_lshift matheus.ferst
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: matheus.ferst @ 2022-03-30 17:59 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc
  Cc: danielhb413, richard.henderson, groug, clg, Matheus Ferst, david

From: Matheus Ferst <matheus.ferst@eldorado.org.br>

This RFC is an alternative to [1] using Int128 types to implement the
128-bit integer conversion routines in softfloat required by the
xscv[su]qqp and xscvqp[su]qz instructions of PowerISA v3.1.

Some improvements to int128.h are made in patches 1 and 2. Patches 3-6
implement the conversion routines, and patches 7 and 8 implement the new
instructions.

RFC: Int128 vs. pair of 64-bit values.
 - Returning unsigned values through Int128 is not ideal, but creating
   an "UInt128" just for this case seems excessive.
 - OTOH, there are fewer cases to handle, especially in float->int.

[1] https://lists.gnu.org/archive/html/qemu-ppc/2022-03/msg00520.html

Matheus Ferst (8):
  qemu/int128: avoid undefined behavior in int128_lshift
  qemu/int128: add int128_urshift
  softfloat: add uint128_to_float128
  softfloat: add int128_to_float128
  softfloat: add float128_to_uint128
  softfloat: add float128_to_int128
  target/ppc: implement xscv[su]qqp
  target/ppc: implement xscvqp[su]qz

 fpu/softfloat.c                     | 183 ++++++++++++++++++++++++++++
 include/fpu/softfloat.h             |   7 ++
 include/qemu/int128.h               |  25 +++-
 target/ppc/fpu_helper.c             |  33 +++++
 target/ppc/helper.h                 |   4 +
 target/ppc/insn32.decode            |   7 ++
 target/ppc/translate/vsx-impl.c.inc |  22 ++++
 tests/unit/test-int128.c            |  32 +++++
 8 files changed, 311 insertions(+), 2 deletions(-)

-- 
2.25.1



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

end of thread, other threads:[~2022-04-20 19:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 17:59 [RFC PATCH 0/8] Alternative softfloat 128-bit integer support matheus.ferst
2022-03-30 17:59 ` [RFC PATCH 1/8] qemu/int128: avoid undefined behavior in int128_lshift matheus.ferst
2022-03-30 18:07   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 2/8] qemu/int128: add int128_urshift matheus.ferst
2022-03-30 18:08   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 3/8] softfloat: add uint128_to_float128 matheus.ferst
2022-03-30 18:10   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 4/8] softfloat: add int128_to_float128 matheus.ferst
2022-03-30 18:11   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 5/8] softfloat: add float128_to_uint128 matheus.ferst
2022-03-30 18:13   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 6/8] softfloat: add float128_to_int128 matheus.ferst
2022-03-30 18:14   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 7/8] target/ppc: implement xscv[su]qqp matheus.ferst
2022-03-30 18:15   ` Richard Henderson
2022-03-30 17:59 ` [RFC PATCH 8/8] target/ppc: implement xscvqp[su]qz matheus.ferst
2022-03-30 18:16   ` Richard Henderson
2022-04-20 19:14 ` [RFC PATCH 0/8] Alternative softfloat 128-bit integer support Daniel Henrique Barboza

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