Re: [PATCH 5/5 ver4] RS6000: Conversions between 128-bit integer and floating point values.

2021-06-07 Thread Segher Boessenkool
On Mon, Apr 26, 2021 at 09:36:33AM -0700, Carl Love wrote:
> This patch adds support for converting to/from 128-bit integers and
> 128-bit decimal floating point formats using the new P10 instructions
> dcffixqq and dctfixqq.  The new instructions are only used on P10 HW,
> otherwise the conversions continue to use the existing SW routines.
> 
> The files fixkfti-sw.c and fixunskfti-sw.c are renamed versions of
> fixkfti.c and fixunskfti.c respectively.  The function names in the
> files were updated with the rename as well as some white spaces fixes.

> --- a/gcc/config/rs6000/rs6000.md
> +++ b/gcc/config/rs6000/rs6000.md
> @@ -6421,6 +6421,42 @@
> xscvsxddp %x0,%x1"
>[(set_attr "type" "fp")])
>  
> +(define_insn "floatti2"
> +  [(set (match_operand:IEEE128 0 "vsx_register_operand" "=v")
> +   (float:IEEE128 (match_operand:TI 1 "vsx_register_operand" "v")))]

Broken indent?  It should be indented by 8 spaces, thus, a tab.  (More of
this further on, please fix all).


It isn't clear to me why you need the separate *_sw and *_hw names, or
if it is just to make it clearer, or maybe something else?  Some words
here would have helped :-)


Okay for trunk.  Thanks!


Segher


Re: [PATCH 5/5 ver4] RS6000: Conversions between 128-bit integer and floating point values.

2021-04-27 Thread will schmidt via Gcc-patches
On Mon, 2021-04-26 at 09:36 -0700, Carl Love wrote:
> Will, Segher:
> 
> This patch adds support for converting to/from 128-bit integers and
> 128-bit decimal floating point formats using the new P10 instructions
> dcffixqq and dctfixqq.  The new instructions are only used on P10 HW,
> otherwise the conversions continue to use the existing SW routines.
> 
> The files fixkfti-sw.c and fixunskfti-sw.c are renamed versions of
> fixkfti.c and fixunskfti.c respectively.  The function names in the
> files were updated with the rename as well as some white spaces fixes.
> 
> The patch has been tested on
> powerpc64-linux instead (Power 8 BE)
> powerpc64-linux instead (Power 9 LE)
> powerpc64-linux instead (Power 10 LE)
> 
> Please let me know if the patch is acceptable for mainline.
> 
>Carl Love
> 
> 
> gcc/ChangeLog
> 
> 2021-04-26  Carl Love  
>   * config/rs6000/rs6000.md (floatti2, floatunsti2,
>   fix_truncti2, fixuns_truncti2): Add
>   define_insn for mode IEEE 128.
> 
> gcc/testsuite/ChangeLog
> 
> 2021-04-26  Carl Love  
>   * gcc.target/powerpc/fp128_conversions.c: New file.
>   * gcc.target/powerpc/int_128bit-runnable.c(vextsd2ppc_native_128bitq,

^ vextsd2ppc_native_128bitq ?   

>   vcmpuq, vcmpsq, vcmpequq, vcmpequq., vcmpgtsq, vcmpgtsq.
>   vcmpgtuq, vcmpgtuq.): Update scan-assembler-times.

>   (ppc_native_128bit): Remove dg-require-effective-target.
> 
> libgcc/ChangeLog
> 2021-04-26  Carl Love  
>   * config.host: Add if test and set for
>   libgcc_cv_powerpc_3_1_float128_hw.
>   * libgcc/config/rs6000/fixkfti.c: Renamed to fixkfti-sw.c.
>   Change calls of __fixkfti to __fixkfti_sw.
>   * libgcc/config/rs6000/fixunskfti.c: Renamed to fixunskfti-sw.c.
>   Change calls of __fixunskfti to __fixunskfti_sw.
>   * libgcc/config/rs6000/float128-p10.c (__floattikf_hw,
>   __floatuntikf_hw, __fixkfti_hw, __fixunskfti_hw): New file.
>   * libgcc/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.
>   * libgcc/config/rs6000/float128-sed (floattitf, __floatuntitf,
>   __fixtfti, __fixunstfti): Add editor commands to change names.
>   * libgcc/config/rs6000/float128-sed-hw (__floattitf,
>   __floatuntitf, __fixtfti, __fixunstfti): Add editor commands to
>   change names.
>   * libgcc/config/rs6000/floattikf.c: Renamed to floattikf-sw.c.
>   * libgcc/config/rs6000/floatuntikf.c: Renamed to floatuntikf-sw.c.
>   * libgcc/config/rs6000/quaad-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.
>   * libgcc/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.
>   * libgcc/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.
>   * libgcc/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.


Ok.

Only skimmed, nothing else jumped out at me from below.

thanks
-Will