[GSoC-19] Implementing narrowing functions like fadd
Joseph Myers
joseph@codesourcery.com
Wed Jul 24 16:23:00 GMT 2019
On Tue, 23 Jul 2019, Tejas Joshi wrote:
> Also, CASE_MATHFN and CASE_MATHFN_FLOATN cases in builtins.c expand
> normal, F and L variants which are assigned to respective fcode
> built_in_function. This makes any function defined in builtins.def to
> have F and L variants mandatory. How these narrowing functions are
> supposed to be handled? Do we define another macro expansion like
> CASE_MATHFN or have a manual case handling in mathfn_built_in_2?
> Attached patch is what I have tried so far.
You'll need something different from CASE_MATHFN - these are a different
kind of functions that need handling in a different way, because they are
parametrized over certain *pairs* of types, rather than over a single
type.
(The main case for these being built-in is probably not folding for
constant arguments - it's generating appropriate instructions when
building with -fno-math-errno for processors that have appropriate
narrowing instructions, such as Power ISA 2.07 or later, which I think
means POWER8 or later.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list