Message ID | 20220330175932.6995-1-matheus.ferst@eldorado.org.br |
---|---|
Headers | show |
Series | Alternative softfloat 128-bit integer support | expand |
All patches but patch 01 queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 3/30/22 14:59, matheus.ferst@eldorado.org.br wrote: > 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(-) >
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(-)