[PATCHv2,00/12] Introduce ieee128 symbols and redirections

Message ID 20180620020426.20372-1-tuliom@linux.ibm.com
Headers show
Series
  • Introduce ieee128 symbols and redirections
Related show

Message

Tulio Magno Quites Machado Filho June 20, 2018, 2:04 a.m.
Changes since v1:

 - Reordered the patch series: the first patches are generic, while the last
   ones affect only ldbl-128ibm-compat.
 - Added a patch to fix bug #23294.
 - Removed the symbols for __f64x*ieee128.
 - Added symbols for narrow functions __f32*ieee128 and __f64*ieee128.
 - Redirected narrow functions to __f*ieee128
 - Stopped exporting internal functions __gamma_productieee128,
   __lgamma_negieee128, __lgamma_productieee128 and __x2y2m1ieee128;
 - Splitted both patches for scalb and significad in 2: 1 patch adding just
   the template and another one with the ldbl-128ibm-compat changes.
 - Replaced all generic implementations of w_scalb, w_scalb_compat, e_scalb
   and s_significand with templates.
 - Replaced the patch for __dremieee128 and __gamaieee128 with just macros
   in math/math.h.
 - Reworked completely the math-finite.h refactoring.  It's now reusing
   math/bits/mathcalls.h.  It also identifies the fix to bug #23292.

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 (10):
  Undefine redirections after long double definition on __LDBL_COMPAT
    [BZ #23294]
  Move declare_mgen_finite_alias definition
  Add a generic scalb implementation
  Add a generic significand implementation
  Refactor math/bits/math-finite.h, reusing math/bits/mathcalls.h [BZ
    #23292]
  ldbl-128ibm-compat: Create libm-alias-float128.h
  ldbl-128ibm-compat: Provide a scalb implementation
  ldbl-128ibm-compat: Provide a significand implementation
  ldbl-128ibm-compat: Redirect long double functions to f128/ieee128
    functions
  ldbl-128ibm-compat: Provide ieee128 symbols to narrow functions

 include/math.h                                     |  12 +-
 math/Makefile                                      |  12 +-
 math/bits/math-finite.h                            | 160 ++----
 math/bits/mathcalls-helper-functions.h             |  18 +-
 math/bits/mathcalls.h                              |  62 +--
 math/complex.h                                     |  29 +-
 math/e_exp2_template.c                             |   7 -
 math/{e_scalb.c => e_scalb_template.c}             |  32 +-
 math/e_scalbf.c                                    |  54 --
 math/e_scalbl.c                                    |  54 --
 math/math-narrow.h                                 |  10 +
 math/math.h                                        | 548 ++++++++++++---------
 math/s_significand.c                               |  34 --
 math/s_significand_template.c                      |  33 ++
 math/s_significandf.c                              |  27 -
 math/s_significandl.c                              |  34 --
 ...{w_scalb_compat.c => w_scalb_compat_template.c} |  36 +-
 math/{w_scalbf_compat.c => w_scalb_template.c}     |  54 +-
 math/w_scalbl_compat.c                             |  81 ---
 sysdeps/generic/math-type-macros-double.h          |   1 +
 sysdeps/generic/math-type-macros-float.h           |   1 +
 sysdeps/generic/math-type-macros-ldouble.h         |   1 +
 sysdeps/generic/math-type-macros.h                 |  15 +
 sysdeps/ieee754/float128/w_scalbf128.c             |   1 +
 sysdeps/ieee754/float128/w_scalbf128_compat.c      |   1 +
 sysdeps/ieee754/ldbl-128ibm-compat/Versions        | 127 +++++
 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_scalbf128.c   |  27 +
 sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h     |   6 +-
 sysdeps/ieee754/ldbl-opt/s_significand.c           |   5 -
 sysdeps/ieee754/ldbl-opt/s_significandl.c          |   5 -
 sysdeps/ieee754/ldbl-opt/w_scalb_compat.c          |   5 -
 sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c         |   5 -
 37 files changed, 868 insertions(+), 797 deletions(-)
 rename math/{e_scalb.c => e_scalb_template.c} (64%)
 delete mode 100644 math/e_scalbf.c
 delete mode 100644 math/e_scalbl.c
 delete mode 100644 math/s_significand.c
 create mode 100644 math/s_significand_template.c
 delete mode 100644 math/s_significandf.c
 delete mode 100644 math/s_significandl.c
 rename math/{w_scalb_compat.c => w_scalb_compat_template.c} (69%)
 rename math/{w_scalbf_compat.c => w_scalb_template.c} (53%)
 delete mode 100644 math/w_scalbl_compat.c
 create mode 100644 sysdeps/ieee754/float128/w_scalbf128.c
 create mode 100644 sysdeps/ieee754/float128/w_scalbf128_compat.c
 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_scalbf128.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_significand.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/s_significandl.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/w_scalb_compat.c
 delete mode 100644 sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c

-- 
2.14.4

Comments

Joseph Myers June 21, 2018, 4:53 p.m. | #1
An observation about something not in this patch series, but that should 
be somewhere in the ieee128 implementation:

ieee754.h is an installed header.  There are separate ldbl-128 and 
ldbl-128ibm versions.  I think you need a new version for 
ldbl-128ibm-compat configurations (presuming the sysdeps ordering places 
that directory before any others providing ieee754.h), that makes the 
precise long-double-related unions provided depend on the long double 
format for the current compilation.

-- 
Joseph S. Myers
joseph@codesourcery.com