mbox series

[0/9] Introduce ieee128 symbols and redirections

Message ID 20180606223909.16675-1-tuliom@linux.ibm.com
Headers show
Series Introduce ieee128 symbols and redirections | expand

Message

Tulio Magno Quites Machado Filho June 6, 2018, 10:39 p.m. UTC
*** BLURB HERE ***

This patchset implements what we have discussed recently about the powerpc64le
long double migration for math and complex math functions.

It adds __*ieee128 symbols to all functions that do not provide a respective
global __*f128 symbol.  Which means that __finitef128, __isnanf128,
__issignalingf128, __iseqsigf128, __fpclassifyf128, __signbitf128,
__isinff128 and all *f128_finite symbols are reused.

A list with all the new symbols is available with file
sysdeps/ieee754/ldbl-128ibm-compat/Versions.


Gabriel F. T. Gomes (1):
  ldbl-128ibm-compat: Provide nexttoward functions

Rajalakshmi Srinivasaraghavan (1):
  ldbl-128ibm-compat: Redirect complex math functions

Tulio Magno Quites Machado Filho (7):
  ldbl-128ibm-compat: Create libm-alias-float128.h
  Move declare_mgen_finite_alias definition
  ldbl-128ibm-compat: Provide a generic scalb implementation
  ldbl-128ibm-compat: Add a generic significand() implementation
  ldbl-128ibm-compat: Provide ISO C functions not provided by the
    _Float128 API
  Refactor math-finite.h and introduce mathcalls-redir.h
  ldbl-128ibm-compat: Redirect long double functions to f128/ieee128
    functions

 include/bits/mathcalls-redir.h                     |   1 +
 include/math.h                                     |  12 +-
 math/Makefile                                      |   3 +-
 math/bits/math-finite.h                            | 151 ++-----
 math/bits/mathcalls-redir.h                        | 460 +++++++++++++++++++++
 math/complex.h                                     |  28 +-
 math/e_exp2_template.c                             |   7 -
 math/e_scalb_template.c                            |  54 +++
 math/math.h                                        |  91 +++-
 math/s_significand_template.c                      |  33 ++
 math/w_scalb_template.c                            |  95 +++++
 sysdeps/generic/math-type-macros.h                 |  15 +
 sysdeps/ieee754/ldbl-128ibm-compat/Makefile        |   6 +
 sysdeps/ieee754/ldbl-128ibm-compat/Versions        | 136 ++++++
 sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c   |  21 +
 .../ldbl-128ibm-compat/libm-alias-float128.h       |  64 +++
 .../ieee754/ldbl-128ibm-compat/s_nextafterf128.c   |  20 +
 .../ieee754/ldbl-128ibm-compat/s_nexttowardf128.c  |  38 ++
 .../ieee754/ldbl-128ibm-compat/s_significandf128.c |  25 ++
 sysdeps/ieee754/ldbl-128ibm-compat/w_lgammaf128.c  |  22 +
 .../ieee754/ldbl-128ibm-compat/w_remainderf128.c   |  22 +
 sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c   |  27 ++
 sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h     |   6 +-
 23 files changed, 1204 insertions(+), 133 deletions(-)
 create mode 100644 include/bits/mathcalls-redir.h
 create mode 100644 math/bits/mathcalls-redir.h
 create mode 100644 math/e_scalb_template.c
 create mode 100644 math/s_significand_template.c
 create mode 100644 math/w_scalb_template.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/Makefile
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/Versions
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/e_scalbf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/libm-alias-float128.h
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/s_nextafterf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/s_nexttowardf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/s_significandf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/w_lgammaf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/w_remainderf128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/w_scalbf128.c

Comments

Joseph Myers June 6, 2018, 11:11 p.m. UTC | #1
As a general principle, I'd suggest using a consistent naming convention 
for all the ieee128 function variants being added in both libc and libm.  
So, if __ieee128_* is used in libc that would indicate functions such as 
__ieee128_cosl in libm, for example.  (For the libm functions this is 
presumably mainly a matter of how a few macros get defined.)
Tulio Magno Quites Machado Filho June 13, 2018, 8:25 p.m. UTC | #2
Joseph Myers <joseph@codesourcery.com> writes:

> As a general principle, I'd suggest using a consistent naming convention 
> for all the ieee128 function variants being added in both libc and libm.  
> So, if __ieee128_* is used in libc that would indicate functions such as 
> __ieee128_cosl in libm, for example.  (For the libm functions this is 
> presumably mainly a matter of how a few macros get defined.)

Ack.  We're planning to use the format __*ieee128 everywhere.
However, there are cases that need special treatment and will be slightly
different, e.g.:  __nextowardf_to_ieee128 and __nexttoward_to_ieee128.

Is that OK?
Joseph Myers June 13, 2018, 8:28 p.m. UTC | #3
On Wed, 13 Jun 2018, Tulio Magno Quites Machado Filho wrote:

> Joseph Myers <joseph@codesourcery.com> writes:
> 
> > As a general principle, I'd suggest using a consistent naming convention 
> > for all the ieee128 function variants being added in both libc and libm.  
> > So, if __ieee128_* is used in libc that would indicate functions such as 
> > __ieee128_cosl in libm, for example.  (For the libm functions this is 
> > presumably mainly a matter of how a few macros get defined.)
> 
> Ack.  We're planning to use the format __*ieee128 everywhere.
> However, there are cases that need special treatment and will be slightly
> different, e.g.:  __nextowardf_to_ieee128 and __nexttoward_to_ieee128.
> 
> Is that OK?

Yes.