[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 0/8] Alternative softfloat 128-bit integer support
From: |
matheus . ferst |
Subject: |
[RFC PATCH 0/8] Alternative softfloat 128-bit integer support |
Date: |
Wed, 30 Mar 2022 14:59:24 -0300 |
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
- [RFC PATCH 0/8] Alternative softfloat 128-bit integer support,
matheus . ferst <=
- [RFC PATCH 1/8] qemu/int128: avoid undefined behavior in int128_lshift, matheus . ferst, 2022/03/30
- [RFC PATCH 2/8] qemu/int128: add int128_urshift, matheus . ferst, 2022/03/30
- [RFC PATCH 3/8] softfloat: add uint128_to_float128, matheus . ferst, 2022/03/30
- [RFC PATCH 4/8] softfloat: add int128_to_float128, matheus . ferst, 2022/03/30
- [RFC PATCH 5/8] softfloat: add float128_to_uint128, matheus . ferst, 2022/03/30