[PATCH, version 3], Add support for _Float<N> and _Float<N>X sqrt, fma, fmin, fmax built-in functions
Michael Meissner
meissner@linux.vnet.ibm.com
Tue Oct 24 23:58:00 GMT 2017
- Previous message (by thread): [PATCH, version 3], Add support for _Float<N> and _Float<N>X sqrt, fma, fmin, fmax built-in functions
- Next message (by thread): [PATCH, version 4], Add support for _Float<N> and _Float<N>X sqrt, fma, fmin, fmax built-in functions
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Tue, Oct 24, 2017 at 11:08:15PM +0000, Joseph Myers wrote:
> On Tue, 24 Oct 2017, Michael Meissner wrote:
>
> > This patch adds a new switch (-fimplicit-math-floatn) that when enabled, it
> > will add implicit declarations for copysign, fabs, fma, fmax, fmin, nan, and
> > sqrt _Float<N> and _Float<N>X variants. Like the previous patch, it adds fma,
> > fmax, fmin, and sqrt builtins to the machine independent built-in support, and
> > removed the PowerPC specific __builtin_{sqrt,fma}f128 functions.
>
> I don't see why this new option is needed. My expectation would be to use
> DEF_EXT_LIB_BUILTIN, as discussed before (i.e. declare the non-__builtin_*
> variants by default, but not if flag_iso).
>
> That they should be declared by default is clear, in line with the normal
> principle of enabling GNU extensions by default. That they should not be
> declared with existing -std=c11 etc. options is also clear. Sometimes
> there may be a use for an option to enable particular features of a TS
> (e.g. -fpermitted-flt-eval-methods=ts-18661-3,
> -fno-fp-int-builtin-inexact), I just don't see the requirement for it in
> this particular case. Of course, if in future TS 18661-3 gets added to
> C2x, such built-in functions could be enabled for -std=c2x, subject to any
> questions of the circumstances under which their names are reserved if the
> relevant feature test macros are not defined.
>
> (There are various issues with the documentation of the new option as
> well.)
Ok, I misunderstood your previous comment. I thought you were saying not to
export the normal functions (not huge_val, nan, inf) by default on the off
chance that somebody could declare a sqrtf128 function that did something
else.
I would prefer not to have the switch, but I wanted some way for fmaf128 and
sqrtf128 to automatically use the instructions. I'll switch it to
DEF_EXT_LIB_BUILTIN, and delete the option.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
- Previous message (by thread): [PATCH, version 3], Add support for _Float<N> and _Float<N>X sqrt, fma, fmin, fmax built-in functions
- Next message (by thread): [PATCH, version 4], Add support for _Float<N> and _Float<N>X sqrt, fma, fmin, fmax built-in functions
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Gcc-patches
mailing list