https://gcc.gnu.org/g:14351faecbe65b1ff49d294e34275cc46f7ab26f
commit 14351faecbe65b1ff49d294e34275cc46f7ab26f Author: Michael Meissner <[email protected]> Date: Wed Sep 30 22:39:14 2026 -0400 Use perl to convert float functions for 16-bit floating point This patch removes the ppc-float* functions, and instead uses perl to generate these automatically from the soft-fp sources. 2026-09-30 Michael Meissner <[email protected]> libgcc/ * config/rs6000/convert-16bit-fp-fix: Minor cleanup. * config/rs6000/convert-16bit-fp-float: New script to create the float* and floatun* functions for 16-bit floating point. * config/rs6000/t-float16: Automatially generate the ppc-float* files. * config/rs6000/ppc-floatdibf.c: Delete. * config/rs6000/ppc-floatdihf.c: Likewise. * config/rs6000/ppc-floatsibf.c: Likewise. * config/rs6000/ppc-floatsihf.c: Likewise. * config/rs6000/ppc-floattibf.c: Likewise. * config/rs6000/ppc-floattihf.c: Likewise. * config/rs6000/ppc-floatundibf.c: Likewise. * config/rs6000/ppc-floatundihf.c: Likewise. * config/rs6000/ppc-floatunsibf.c: Likewise. * config/rs6000/ppc-floatunsihf.c: Likewise. * config/rs6000/ppc-floatuntibf.c: Likewise. * config/rs6000/ppc-floatuntihf.c: Likewise. Diff: --- libgcc/config/rs6000/convert-16bit-fp-fix | 9 +- libgcc/config/rs6000/convert-16bit-fp-float | 167 ++++++++++++++++++++++++++++ libgcc/config/rs6000/ppc-floatdibf.c | 69 ------------ libgcc/config/rs6000/ppc-floatdihf.c | 69 ------------ libgcc/config/rs6000/ppc-floatsibf.c | 69 ------------ libgcc/config/rs6000/ppc-floatsihf.c | 69 ------------ libgcc/config/rs6000/ppc-floattibf.c | 69 ------------ libgcc/config/rs6000/ppc-floattihf.c | 69 ------------ libgcc/config/rs6000/ppc-floatundibf.c | 68 ----------- libgcc/config/rs6000/ppc-floatundihf.c | 68 ----------- libgcc/config/rs6000/ppc-floatunsibf.c | 68 ----------- libgcc/config/rs6000/ppc-floatunsihf.c | 68 ----------- libgcc/config/rs6000/ppc-floatuntibf.c | 68 ----------- libgcc/config/rs6000/ppc-floatuntihf.c | 68 ----------- libgcc/config/rs6000/t-float16 | 116 +++++++++++++++---- 15 files changed, 263 insertions(+), 851 deletions(-) diff --git a/libgcc/config/rs6000/convert-16bit-fp-fix b/libgcc/config/rs6000/convert-16bit-fp-fix index 473b2ca2d65b..5417c3694b1f 100755 --- a/libgcc/config/rs6000/convert-16bit-fp-fix +++ b/libgcc/config/rs6000/convert-16bit-fp-fix @@ -116,9 +116,10 @@ do { if ($line =~ /^__fix/) { $line =~ s/[BDHST]F/${u_letter}F/; $line =~ s/[bdhst]f/${l_letter}f/; - } - $line =~ s/_(DECL|RAW|INT)_[BHDST]/_${1}_${u_letter}/; + } else { + $line =~ s/_(DECL|RAW|INT)_[BHDST]/_${1}_${u_letter}/; + } push (@func, $line); $line = <>; @@ -143,10 +144,9 @@ foreach $line (@func) { # Function header if ($line =~ /^__(fix|fixuns)([bh]f)([sdt]i)/) { $line = "__${1}${2}${3}_gpr (unsigned short us)"; - } # Add conversion from unsigned short - if ($line =~ /FP_INIT_EXCEPTIONS/) { + } elsif ($line =~ /FP_INIT_EXCEPTIONS/) { print " ${u_letter}Ftype a;\n"; print " union ushort_${l_letter}f u;\n"; print "\n"; @@ -160,4 +160,3 @@ foreach $line (@func) { # Done exit 0; - diff --git a/libgcc/config/rs6000/convert-16bit-fp-float b/libgcc/config/rs6000/convert-16bit-fp-float new file mode 100755 index 000000000000..0c4381cec55c --- /dev/null +++ b/libgcc/config/rs6000/convert-16bit-fp-float @@ -0,0 +1,167 @@ +#! /usr/bin/perl -w +# Convert a libgcc/soft-fp fix<fp><int> fuunction for the PowerPC + +# Copyright (C) 2020-2026 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# <http://www.gnu.org/licenses/>. +# +# The PowerPC 16-bit floating point support is considering requiring +# 16-bit floating point arguments to the 32/64-bit scalar format in +# registers and similarly returning the 16-bit floating point return to +# a 32/64-bit scalar value. However, this presents a problem in that +# if a machine doesn't have instructions to do a conversion in +# hardware, you can't call the soft-fp conversion function using the +# native calling sequence. +# +# This perl script converts a float<int><fp>.c. or floatun<int><fp>.c +# file to do the conversion to BFtype (Google brain 16-bit float) or +# HFtype (IEEE 754 _Float16). It produces 2 functions, one that has +# the normal name and takes the normal arguments, and the other that +# adds a _gpr suffix and changes the 16-bit floating point to unsigned +# short. +# +# A typical fix* conversion file looks like: +# +# <copyright message> +# +# DFtype +# __floatdidf (DItype i) +# { +# FP_DECL_EX; +# FP_DECL_D (A); +# DFtype a; +# +# FP_INIT_ROUNDMODE; +# FP_FROM_INT_D (A, i, DI_BITS, UDItype); +# FP_PACK_RAW_D (a, A); +# FP_HANDLE_EXCEPTIONS; +# +# return a; +# } + +use warnings; +use strict; +use Getopt::Std; + +use vars qw($opt_b $opt_h); + +$opt_b = 0; +$opt_h = 0; + +&getopts ("bh") || die "Useage $0 [-b] [-h] <input >output\n"; + +die "$0: Either -b or -h must be passed\n" if (!$opt_b && !$opt_h); +die "$0: Both -b and -h must not be passed\n" if ($opt_b && $opt_h); + +# Scan the input and put out the copyright message + +my $line; +my $input = $ARGV[0]; + +while ($line = <>) { + chomp $line; + + last if ($line =~ /^[#]include/); + print $line, "\n"; +} + +if ($input) { + print "/* Automatically converted from $input. */\n"; + print "\n"; +} + +# Change the include file from the floating point type to either half.h +# or brain.h. + +die "$0: No include files\n" if (! defined ($line)); + +my $inc = ($opt_h ? "half" : "brain"); + +do { + $line =~ s/(single|double|extended|half|quad)/$inc/; + print $line, "\n"; + $line = <>; + +} while (defined ($line) && $line =~ /^[#]include/); + +# Scoop up the rest of the file, convert the function to +# return a HFtype or BFtype type. + +die "$0: No main source\n" if (! defined ($line)); + +my @func = (); +my $u_letter = ($opt_h ? "H" : "B"); +my $l_letter = ($opt_h ? "h" : "b"); + +do { + chomp $line; + + # Function return + if ($line =~ /^[BDHST]Ftype$/) { + $line = "${u_letter}Ftype"; + + # Function line + } elsif ($line =~ /^__float/) { + $line =~ s/[bdhst]f/${l_letter}f/; + } + + $line =~ s/_(DECL|RAW|INT)_[BHDST]/_${1}_${u_letter}/; + + push (@func, $line); + $line = <>; + +} while (defined ($line)); + +# Print out the normal conversion function + +print "/* ${u_letter}Ftype returned in FPR registers. */\n"; + +foreach $line (@func) { + print $line, "\n"; +} + +# Print out the special GPR function. + +print "\n"; +print "/* ${u_letter}Ftype returned in GPR registers. */\n"; + +foreach $line (@func) { + + # Function return + if ($line eq "${u_letter}Ftype") { + $line = "unsigned short"; + + # Function header + } elsif ($line =~ /^__(float|floatun)([sdt]i)([bh]f) (.*)$/) { + $line = "__${1}${2}${3}_gpr ${4}"; + + # Add declartion of union + } elsif ($line =~ /FP_INIT_ROUNDMODE/) { + print " union ushort_or_${l_letter}f u;\n"; + print "\n"; + + # Return value + } elsif ($line =~ /return a;/) { + print " u.${l_letter}f = a;\n"; + $line = " return u.us;"; + } + + print $line, "\n"; +} + +# Done +exit 0; diff --git a/libgcc/config/rs6000/ppc-floatdibf.c b/libgcc/config/rs6000/ppc-floatdibf.c deleted file mode 100644 index 12645b96b444..000000000000 --- a/libgcc/config/rs6000/ppc-floatdibf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Software floating-point emulation. - Convert a 32bit signed integer to bfloat16 - Copyright (C) 2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatdibf.c. - - We provide 2 conversions, one that returns the BFtype in a floating point - register and the other returns it in a general purpose register that is used - when BFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "brain.h" - -BFtype -__floatdibf (DItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, DI_BITS, UDItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatdibf_gpr (DItype i) -{ - union ushort_bf u; - - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, DI_BITS, UDItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - u.bf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatdihf.c b/libgcc/config/rs6000/ppc-floatdihf.c deleted file mode 100644 index 503a760d30e7..000000000000 --- a/libgcc/config/rs6000/ppc-floatdihf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Software floating-point emulation. - Convert a 32bit signed integer to hfloat16 - Copyright (C) 2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatdihf.c. - - We provide 2 conversions, one that returns the HFtype in a floating point - register and the other returns it in a general purpose register that is used - when HFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "half.h" - -HFtype -__floatdihf (DItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, DI_BITS, UDItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatdihf_gpr (DItype i) -{ - union ushort_hf u; - - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, DI_BITS, UDItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - u.hf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatsibf.c b/libgcc/config/rs6000/ppc-floatsibf.c deleted file mode 100644 index 0dfeff248f96..000000000000 --- a/libgcc/config/rs6000/ppc-floatsibf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Software floating-point emulation. - Convert a 32bit signed integer to bfloat16 - Copyright (C) 2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatsibf.c. - - We provide 2 conversions, one that returns the BFtype in a floating point - register and the other returns it in a general purpose register that is used - when BFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "brain.h" - -BFtype -__floatsibf (SItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, SI_BITS, USItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatsibf_gpr (SItype i) -{ - union ushort_bf u; - - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, SI_BITS, USItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - u.bf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatsihf.c b/libgcc/config/rs6000/ppc-floatsihf.c deleted file mode 100644 index fd5b64cbf4a4..000000000000 --- a/libgcc/config/rs6000/ppc-floatsihf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Software floating-point emulation. - Convert a 32bit signed integer to hfloat16 - Copyright (C) 2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatsihf.c. - - We provide 2 conversions, one that returns the HFtype in a floating point - register and the other returns it in a general purpose register that is used - when HFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "half.h" - -HFtype -__floatsihf (SItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, SI_BITS, USItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatsihf_gpr (SItype i) -{ - union ushort_hf u; - - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, SI_BITS, USItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - u.hf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floattibf.c b/libgcc/config/rs6000/ppc-floattibf.c deleted file mode 100644 index 0503e77cf985..000000000000 --- a/libgcc/config/rs6000/ppc-floattibf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Software floating-point emulation. - Convert a 128bit signed integer to bfloat16 - Copyright (C) 2007-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floattibf.c. - - We provide 2 conversions, one that returns the BFtype in a floating point - register and the other returns it in a general purpose register that is used - when BFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "brain.h" - -BFtype -__floattibf (TItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, TI_BITS, UTItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floattibf_gpr (TItype i) -{ - union ushort_bf u; - - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, TI_BITS, UTItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - u.bf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floattihf.c b/libgcc/config/rs6000/ppc-floattihf.c deleted file mode 100644 index b13016bea83b..000000000000 --- a/libgcc/config/rs6000/ppc-floattihf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Software floating-point emulation. - Convert a 128bit signed integer to hfloat16 - Copyright (C) 2007-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floattihf.c. - - We provide 2 conversions, one that returns the HFtype in a floating point - register and the other returns it in a general purpose register that is used - when HFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "half.h" - -HFtype -__floattihf (TItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, TI_BITS, UTItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floattihf_gpr (TItype i) -{ - union ushort_hf u; - - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, TI_BITS, UTItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - u.hf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatundibf.c b/libgcc/config/rs6000/ppc-floatundibf.c deleted file mode 100644 index 6988882cba91..000000000000 --- a/libgcc/config/rs6000/ppc-floatundibf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Software floating-point emulation. - Convert a 64bit unsigned integer to bfloat16 - Copyright (C) 2007-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatundibf.c. - - We provide 2 conversions, one that returns the BFtype in a floating point - register and the other returns it in a general purpose register that is used - when BFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "brain.h" - -BFtype -__floatundibf (UDItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, DI_BITS, UDItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatundibf_gpr (UDItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - union ushort_bf u; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, DI_BITS, UDItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - u.bf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatundihf.c b/libgcc/config/rs6000/ppc-floatundihf.c deleted file mode 100644 index f2b0b002e276..000000000000 --- a/libgcc/config/rs6000/ppc-floatundihf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Software floating-point emulation. - Convert a 64bit unsigned integer to hfloat16 - Copyright (C) 2007-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatundihf.c. - - We provide 2 conversions, one that returns the HFtype in a floating point - register and the other returns it in a general purpose register that is used - when HFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "half.h" - -HFtype -__floatundihf (UDItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, DI_BITS, UDItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatundihf_gpr (UDItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - union ushort_hf u; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, DI_BITS, UDItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - u.hf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatunsibf.c b/libgcc/config/rs6000/ppc-floatunsibf.c deleted file mode 100644 index 7fcd57eeb11c..000000000000 --- a/libgcc/config/rs6000/ppc-floatunsibf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Software floating-point emulation. - Convert a 32bit unsigned integer to IEEE half. - Copyright (C) 2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. - - This is a clone of softfp/floatunssibf.c. - - We provide 2 conversions, one that returns the BFtype in a floating point - register and the other returns it in a general purpose register that is used - when BFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "brain.h" - -BFtype -__floatunsibf (USItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, SI_BITS, USItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatunsibf_gpr (USItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - union ushort_bf u; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, SI_BITS, USItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - u.bf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatunsihf.c b/libgcc/config/rs6000/ppc-floatunsihf.c deleted file mode 100644 index 10a264669a21..000000000000 --- a/libgcc/config/rs6000/ppc-floatunsihf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Software floating-point emulation. - Convert a 32bit unsigned integer to IEEE half. - Copyright (C) 2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. - - This is a clone of softfp/floatunssihf.c. - - We provide 2 conversions, one that returns the HFtype in a floating point - register and the other returns it in a general purpose register that is used - when HFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "half.h" - -HFtype -__floatunsihf (USItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, SI_BITS, USItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatunsihf_gpr (USItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - union ushort_hf u; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, SI_BITS, USItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - u.hf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatuntibf.c b/libgcc/config/rs6000/ppc-floatuntibf.c deleted file mode 100644 index 36af437af207..000000000000 --- a/libgcc/config/rs6000/ppc-floatuntibf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Software floating-point emulation. - Convert a 128bit unsigned integer to bfloat16 - Copyright (C) 2007-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatuntibf.c. - - We provide 2 conversions, one that returns the BFtype in a floating point - register and the other returns it in a general purpose register that is used - when BFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "brain.h" - -BFtype -__floatuntibf (UTItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, TI_BITS, UTItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatuntibf_gpr (UTItype i) -{ - FP_DECL_EX; - FP_DECL_B (A); - BFtype a; - union ushort_bf u; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_B (A, i, TI_BITS, UTItype); - FP_PACK_RAW_B (a, A); - FP_HANDLE_EXCEPTIONS; - - u.bf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/ppc-floatuntihf.c b/libgcc/config/rs6000/ppc-floatuntihf.c deleted file mode 100644 index ac48cbda0284..000000000000 --- a/libgcc/config/rs6000/ppc-floatuntihf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Software floating-point emulation. - Convert a 128bit unsigned integer to hfloat16 - Copyright (C) 2007-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file into - combinations with other programs, and to distribute those - combinations without any restriction coming from the use of this - file. (The Lesser General Public License restrictions do apply in - other respects; for example, they cover modification of the file, - and distribution when not linked into a combine executable.) - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. - - This is a clone of softfp/floatuntihf.c. - - We provide 2 conversions, one that returns the HFtype in a floating point - register and the other returns it in a general purpose register that is used - when HFtype must be converted to the 32/64-bit scalar type. */ - -#include "soft-fp.h" -#include "half.h" - -HFtype -__floatuntihf (UTItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, TI_BITS, UTItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - return a; -} - -unsigned short -__floatuntihf_gpr (UTItype i) -{ - FP_DECL_EX; - FP_DECL_H (A); - HFtype a; - union ushort_hf u; - - FP_INIT_ROUNDMODE; - FP_FROM_INT_H (A, i, TI_BITS, UTItype); - FP_PACK_RAW_H (a, A); - FP_HANDLE_EXCEPTIONS; - - u.hf = a; - return u.us; -} diff --git a/libgcc/config/rs6000/t-float16 b/libgcc/config/rs6000/t-float16 index 61dc29e5fd9a..ac4b52fe08aa 100644 --- a/libgcc/config/rs6000/t-float16 +++ b/libgcc/config/rs6000/t-float16 @@ -2,8 +2,6 @@ PERL := perl # _Float16 library support, source files in soft-ftp fp16_funcs = extendhf-sfdf2 truncsfdf-hf2 \ - ppc-floatsihf ppc-floatdihf ppc-floattihf \ - ppc-floatunsihf ppc-floatundihf ppc-floatuntihf \ ppc-eqhf2 ppc-floatbitinthf ppc-fixhfbitint fp16_src = $(addprefix $(srcdir)/config/rs6000/,$(addsuffix .c,$(fp16_funcs))) @@ -17,8 +15,6 @@ $(fp16_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) # __bf16 library support, source files in config/rs6000 bfp16_funcs = extendbf-sfdf2 truncsfdf-bf2 \ - ppc-floatsibf ppc-floatdibf ppc-floattibf \ - ppc-floatunsibf ppc-floatundibf ppc-floatuntibf \ ppc-eqbf2 ppc-floatbitintbf ppc-fixbfbitint bfp16_src = $(addprefix $(srcdir)/config/rs6000/,$(addsuffix .c,$(bfp16_funcs))) @@ -40,36 +36,66 @@ $(both_fp16_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) float16_prefix = ppc- float16_fix_orig = $(srcdir)/soft-fp/fixsfdi.c float16_fixuns_orig = $(srcdir)/soft-fp/fixsfdi.c +float16_float_orig = $(srcdir)/soft-fp/floatdisf.c +float16_floatun_orig = $(srcdir)/soft-fp/floatundisf.c float16_fix_script = $(srcdir)/config/rs6000/convert-16bit-fp-fix +float16_float_script = $(srcdir)/config/rs6000/convert-16bit-fp-float # Convert fix* functions for _Float16 fp16x_fix_funcs = fixhfti fixhfdi fixhfsi fp16x_fix_src = $(addprefix $(float16_prefix),$(addsuffix .c,$(fp16x_fix_funcs))) fp16x_fix_obj = $(addprefix $(float16_prefix),$(addsuffix $(objext),$(fp16x_fix_funcs))) +fp16x_fix_dep = $(float16_fix_orig) \ + $(float16_fix_script) \ + $(srcdir)/config/rs6000/t-float16 + fp16x_fixuns_funcs = fixunshfti fixunshfdi fixunshfsi fp16x_fixuns_src = $(addprefix $(float16_prefix),$(addsuffix .c,$(fp16x_fixuns_funcs))) fp16x_fixuns_obj = $(addprefix $(float16_prefix),$(addsuffix $(objext),$(fp16x_fixuns_funcs))) -fp16x_all_funcs = $(fp16x_fix_funcs) $(fp16x_fixuns_funcs) -fp16x_all_src = $(fp16x_fix_src) $(fp16x_fixuns_src) -fp16x_all_obj = $(fp16x_fix_obj) $(fp16x_fixuns_obj) - -fp16x_fix_dep = $(float16_fix_orig) \ +fp16x_fixuns_dep = $(float16_fixuns_orig) \ $(float16_fix_script) \ $(srcdir)/config/rs6000/t-float16 -fp16x_fixuns_dep = $(float16_fixuns_orig) \ - $(float16_fix_script) \ +fp16x_float_funcs = floattihf floatdihf floatsihf +fp16x_float_src = $(addprefloat $(float16_prefloat),$(addsuffloat .c,$(fp16x_float_funcs))) +fp16x_float_obj = $(addprefloat $(float16_prefloat),$(addsuffloat $(objext),$(fp16x_float_funcs))) + +fp16x_float_depi = $(float16_float_orig) \ + $(float16_float_script) \ $(srcdir)/config/rs6000/t-float16 +fp16x_floatun_funcs = floatuntihf floatundihf floatunsihf +fp16x_floatun_src = $(addprefloat $(float16_prefloat),$(addsuffloat .c,$(fp16x_floatun_funcs))) +fp16x_floatun_obj = $(addprefloat $(float16_prefloat),$(addsuffloat $(objext),$(fp16x_floatun_funcs))) + +fp16x_floatun_dep = $(float16_floatun_orig) \ + $(float16_float_script) \ + $(srcdir)/config/rs6000/t-float16 + +fp16x_all_funcs = $(fp16x_fix_funcs) $(fp16x_fixuns_funcs) \ + $(fp16x_float_funcs) $(fp16x_floatun_funcs) + +fp16x_all_src = $(fp16x_fix_src) $(fp16x_fixuns_src) \ + $(fp16x_float_src) $(fp16x_floatun_src) + +fp16x_all_obj = $(fp16x_fix_obj) $(fp16x_fixuns_obj) \ + $(fp16x_float_obj) $(fp16x_floatun_obj) + $(fp16x_fix_src) : $(fp16x_fix_dep) $(PERL) $(float16_fix_script) -h $(float16_fix_orig) > $@ $(fp16x_fixuns_src) : $(fp16x_fixuns_dep) $(PERL) $(float16_fix_script) -h $(float16_fixuns_orig) > $@ +$(fp16x_float_src) : $(fp16x_float_dep) + $(PERL) $(float16_float_script) -h $(float16_float_orig) > $@ + +$(fp16x_floatun_src) : $(fp16x_floatun_dep) + $(PERL) $(float16_float_script) -h $(float16_floatun_orig) > $@ + $(fp16x_all_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) # Convert fix* functions for __bf12 @@ -77,28 +103,55 @@ bfp16x_fix_funcs = fixbfti fixbfdi fixbfsi bfp16x_fix_src = $(addprefix $(float16_prefix),$(addsuffix .c,$(bfp16x_fix_funcs))) bfp16x_fix_obj = $(addprefix $(float16_prefix),$(addsuffix $(objext),$(bfp16x_fix_funcs))) +bfp16x_fix_dep = $(float16_fix_orig) \ + $(float16_fix_script) \ + $(srcdir)/config/rs6000/t-float16 + bfp16x_fixuns_funcs = fixunsbfti fixunsbfdi fixunsbfsi bfp16x_fixuns_src = $(addprefix $(float16_prefix),$(addsuffix .c,$(bfp16x_fixuns_funcs))) bfp16x_fixuns_obj = $(addprefix $(float16_prefix),$(addsuffix $(objext),$(bfp16x_fixuns_funcs))) -bfp16x_all_funcs = $(bfp16x_fix_funcs) $(bfp16x_fixuns_funcs) -bfp16x_all_src = $(bfp16x_fix_src) $(bfp16x_fixuns_src) -bfp16x_all_obj = $(bfp16x_fix_obj) $(bfp16x_fixuns_obj) - -bfp16x_fix_dep = $(float16_fix_orig) \ +bfp16x_fixuns_dep = $(float16_fixuns_orig) \ $(float16_fix_script) \ $(srcdir)/config/rs6000/t-float16 -bfp16x_fixuns_dep = $(float16_fixuns_orig) \ - $(float16_fix_script) \ +bfp16x_float_funcs = floattibf floatdibf floatsibf +bfp16x_float_src = $(addprefloat $(float16_prefloat),$(addsuffloat .c,$(bfp16x_float_funcs))) +bfp16x_float_obj = $(addprefloat $(float16_prefloat),$(addsuffloat $(objext),$(bfp16x_float_funcs))) + +bfp16x_float_depi = $(float16_float_orig) \ + $(float16_float_script) \ + $(srcdir)/config/rs6000/t-float16 + +bfp16x_floatun_funcs = floatuntibf floatundibf floatunsibf +bfp16x_floatun_src = $(addprefloat $(float16_prefloat),$(addsuffloat .c,$(bfp16x_floatun_funcs))) +bfp16x_floatun_obj = $(addprefloat $(float16_prefloat),$(addsuffloat $(objext),$(bfp16x_floatun_funcs))) + +bfp16x_floatun_dep = $(float16_floatun_orig) \ + $(float16_float_script) \ $(srcdir)/config/rs6000/t-float16 +bfp16x_all_funcs = $(bfp16x_fix_funcs) $(bfp16x_fixuns_funcs) \ + $(bfp16x_float_funcs) $(bfp16x_floatun_funcs) + +bfp16x_all_src = $(bfp16x_fix_src) $(bfp16x_fixuns_src) \ + $(bfp16x_float_src) $(bfp16x_floatun_src) + +bfp16x_all_obj = $(bfp16x_fix_obj) $(bfp16x_fixuns_obj) \ + $(bfp16x_float_obj) $(bfp16x_floatun_obj) + $(bfp16x_fix_src) : $(bfp16x_fix_dep) $(PERL) $(float16_fix_script) -b $(float16_fix_orig) > $@ $(bfp16x_fixuns_src) : $(bfp16x_fixuns_dep) $(PERL) $(float16_fix_script) -b $(float16_fixuns_orig) > $@ +$(bfp16x_float_src) : $(bfp16x_float_dep) + $(PERL) $(float16_float_script) -b $(float16_float_orig) > $@ + +$(bfp16x_floatun_src) : $(bfp16x_floatun_dep) + $(PERL) $(float16_float_script) -b $(float16_floatun_orig) > $@ + $(bfp16x_all_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) # For now, only put it in the static library @@ -107,7 +160,7 @@ $(bfp16x_all_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) LIB2ADD_ST += $(fp16_src) $(bfp16_src) $(both_fp16_src) \ $(fp16x_all_src) $(bfp16x_all_src) -.PHONY: test-float16 clean-float16 +.PHONY: test-float16 clean-float16 ppc-srcfiles test-float16: @echo "fp16_src:"; \ @@ -137,12 +190,27 @@ test-float16: echo "fp16x_all_obj:"; \ for x in $(fp16x_all_obj); do echo " $$x"; done; \ echo; \ - echo "float16_prefix = $(float16_prefix)"; \ - echo "float16_fix_orig = $(float16_fix_orig)"; \ - echo "float16_fixuns_orig = $(float16_fixuns_orig)"; \ - echo "float16_fix_script = $(float16_fix_script)"; \ + echo "bfp16x_all_funcs:"; \ + for x in $(bfp16x_all_funcs); do echo " $$x"; done; \ + echo; \ + echo "bfp16x_all_src:"; \ + for x in $(bfp16x_all_src); do echo " $$x"; done; \ + echo; \ + echo "bfp16x_all_obj:"; \ + for x in $(fp16x_all_obj); do echo " $$x"; done; \ + echo; \ + echo "float16_prefix = $(float16_prefix)"; \ + echo "float16_fix_orig = $(float16_fix_orig)"; \ + echo "float16_fixuns_orig = $(float16_fixuns_orig)"; \ + echo "float16_fix_script = $(float16_fix_script)"; \ + echo "float16_float_orig = $(float16_float_orig)"; \ + echo "float16_floatun_orig = $(float16_floatun_orig)"; \ + echo "float16_float_script = $(float16_float_script)"; \ echo clean-float16: @$(MULTICLEAN) multi-clean DO=clean-float16 - rm -f $(fp16x_all_src) + rm -f $(fp16x_all_src) $(bfp16x_all_src) ppc-srcfiles + +ppc-srcfiles: $(fp16x_all_src) $(bfp16x_all_src) + @touch ppc-srcfiles
