Conversions between 128-bit integer and floating point values.
authorCarl Love <cel@us.ibm.com>
Wed, 21 Apr 2021 22:07:39 +0000 (18:07 -0400)
committerCarl Love <cel@us.ibm.com>
Wed, 9 Jun 2021 16:20:07 +0000 (11:20 -0500)
commit9090f4807161876033f6bf0e1133364b38d91865
tree5360f8bb969758257a28e52ef2839137fd8934bf
parentf170186446d03638cd82e37aa2a1bcf4dc1adba2
Conversions between 128-bit integer and floating point values.

The files fixkfti-sw.c and fixunskfti-sw.c are renamed versions of
fixkfti.c and fixunskfti.c respectively to do the conversions in software.
The function names in the files were updated with the rename as well as
some white spaces fixes. The file float128-p10.c contains the functions
for using the ISA 3.1 hardware instructions to perform the conversions.

2021-06-08  Carl Love  <cel@us.ibm.com>

gcc/ChangeLog

* config/rs6000/rs6000.c (__fixkfti, __fixunskfti, __floattikf,
__floatuntikf): Names changed to __fixkfti_sw, __fixunskfti_sw,
__floattikf_sw, __floatuntikf_sw respectively.
* config/rs6000/rs6000.md (floatti<mode>2, floatunsti<mode>2,
fix_trunc<mode>ti2, fixuns_trunc<mode>ti2): Add
define_insn for mode IEEE 128.

gcc/testsuite/ChangeLog

* gcc.target/powerpc/fp128_conversions.c: New file.
* gcc.target/powerpc/int_128bit-runnable.c(vextsd2q,
vcmpuq, vcmpsq, vcmpequq, vcmpequq., vcmpgtsq, vcmpgtsq.
vcmpgtuq, vcmpgtuq.): Update scan-assembler-times.
(ppc_native_128bit): Remove dg-require-effective-target.

libgcc/ChangeLog

* config.host: Add if test and set for
libgcc_cv_powerpc_3_1_float128_hw.
* config/rs6000/fixkfti.c: Renamed to fixkfti-sw.c.
Change calls of __fixkfti to __fixkfti_sw.
* config/rs6000/fixunskfti.c: Renamed to fixunskfti-sw.c.
Change calls of __fixunskfti to __fixunskfti_sw.
* config/rs6000/float128-p10.c (__floattikf_hw,
__floatuntikf_hw, __fixkfti_hw, __fixunskfti_hw): New file.
* config/rs6000/float128-ifunc.c (SW_OR_HW_ISA3_1): New macro.
(__floattikf_resolve, __floatuntikf_resolve, __fixkfti_resolve,
__fixunskfti_resolve): Add resolve functions.
(__floattikf, __floatuntikf, __fixkfti, __fixunskfti): New functions.
* config/rs6000/float128-sed (floattitf, __floatuntitf,
__fixtfti, __fixunstfti): Add editor commands to change names.
* config/rs6000/float128-sed-hw (__floattitf,
__floatuntitf, __fixtfti, __fixunstfti): Add editor commands to
change names.
* config/rs6000/floattikf.c: Renamed to floattikf-sw.c.
* config/rs6000/floatuntikf.c: Renamed to floatuntikf-sw.c.
* config/rs6000/quad-float128.h (__floattikf_sw,
__floatuntikf_sw, __fixkfti_sw, __fixunskfti_sw, __floattikf_hw,
__floatuntikf_hw, __fixkfti_hw, __fixunskfti_hw, __floattikf,
__floatuntikf, __fixkfti, __fixunskfti): New extern declarations.
* config/rs6000/t-float128 (floattikf, floatuntikf,
fixkfti, fixunskfti): Remove file names from fp128_ppc_funcs.
(floattikf-sw, floatuntikf-sw, fixkfti-sw, fixunskfti-sw): Add
file names to fp128_ppc_funcs.
* config/rs6000/t-float128-hw(fp128_3_1_hw_funcs,
fp128_3_1_hw_src, fp128_3_1_hw_static_obj, fp128_3_1_hw_shared_obj,
fp128_3_1_hw_obj): Add variables for ISA 3.1 support.
* config/rs6000/t-float128-p10-hw: New file.
* configure: Update script for isa 3.1 128-bit float support.
* configure.ac: Add check for 128-bit float hardware support.
19 files changed:
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/testsuite/gcc.target/powerpc/fp128_conversions.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/int_128bit-runnable.c
libgcc/config.host
libgcc/config/rs6000/fixkfti-sw.c [moved from libgcc/config/rs6000/fixkfti.c with 96% similarity]
libgcc/config/rs6000/fixunskfti-sw.c [moved from libgcc/config/rs6000/fixunskfti.c with 96% similarity]
libgcc/config/rs6000/float128-ifunc.c
libgcc/config/rs6000/float128-p10.c [new file with mode: 0644]
libgcc/config/rs6000/float128-sed
libgcc/config/rs6000/float128-sed-hw
libgcc/config/rs6000/floattikf-sw.c [moved from libgcc/config/rs6000/floattikf.c with 96% similarity]
libgcc/config/rs6000/floatuntikf-sw.c [moved from libgcc/config/rs6000/floatuntikf.c with 96% similarity]
libgcc/config/rs6000/quad-float128.h
libgcc/config/rs6000/t-float128
libgcc/config/rs6000/t-float128-hw
libgcc/config/rs6000/t-float128-p10-hw [new file with mode: 0644]
libgcc/configure
libgcc/configure.ac