[00/14] Functions with format string for IEEE128 on powercpc64le

Message ID 20180621021023.17036-1-gabriel@inconstante.eti.br
Headers show
Series
  • Functions with format string for IEEE128 on powercpc64le
Related show

Message

Gabriel F. T. Gomes June 21, 2018, 2:10 a.m.
As a follow-up to my previous message on this topic [1], this patch set
adds more functions that need new versions on powerpc64le for the long
double format transition.  There are functions that are still missing
(__isoc99_*scanf, printf_size, obstack_*printf, obstack_*printf_chk,
strfmon, as well as strfromld and strtold), thus, the redirections are
still on a temporary patch (not included in this email thread, but
provided in my personal branch [2]).

These changes depend on Zack's patches [3], which I have rebased on top
of current master and which are again available on my personal branch [2].

Changes since the RFC:

  - Rebased the branch against current master;
  - Fixed setting of 'is_binary128' and added a test for the printing of
    double values in __*ieee128 functions;
  - Renamed the external functions to the pattern __*ieee128;
  - Added patch to prepare vfscanf to use the 'mode_flags' parameter on
    __*ieee128 functions
  - Added a similar patch to prepare functions from argp.h, err.h, and
    error.h for the same goal (following Zack's idea of a 'mode_flags'
    parameter.
  - Added functions and tests for __*printfieee128, __*scanfieee128
    (except for __isoc99_*scanf), as well as for the functions in
    argp.h, err.h, and error.h.
    - These changes are spread across many commits, in the hope that it
      can ease review.  If someone would prefer some squashes, that
      sould be easy to do.

[1] https://sourceware.org/ml/libc-alpha/2018-06/msg00068.html

[2] https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/gabriel/powerpc-ieee128-printscan

[3] https://sourceware.org/ml/libc-alpha/2018-03/msg00185.html

Gabriel F. T. Gomes (14):
  Prepare vfprintf to use __printf_fp/__printf_fphex with float128 arg
  Prepare vfscanf to use __strtof128_internal
  Add internal implementations for argp.h, err.h, and error.h functions
  ldbl-128ibm-compat: Add regular character printing functions
  ldbl-128ibm-compat: Add wide character printing functions
  ldbl-128ibm-compat: Add regular character, fortified printing
    functions
  ldbl-128ibm-compat: Add wide character, fortified printing functions
  ldbl-128ibm-compat: Test double values
  ldbl-128ibm-compat: Add regular character scanning functions
  ldbl-128ibm-compat: Add wide character scanning functions
  ldbl-128ibm-compat: Add argp_error and argp_failure
  ldbl-128ibm-compat: Add err.h functions
  ldbl-128ibm-compat: Add error.h functions
  ldbl-128ibm-compat: Add tests for err.h and error.h functions

 argp/argp-help.c                                   |  44 +--
 argp/argpP.h                                       |  29 ++
 libio/libioP.h                                     |  10 +-
 misc/err.c                                         |  36 ++-
 misc/errP.h                                        |  28 ++
 misc/error.c                                       |  46 ++-
 misc/errorP.h                                      |  28 ++
 stdio-common/printf-parse.h                        |   3 +
 stdio-common/vfprintf-internal.c                   |  62 +++-
 stdio-common/vfscanf-internal.c                    |  14 +
 sysdeps/ieee754/ldbl-128ibm-compat/Makefile        | 333 +++++++++++++++++++++
 sysdeps/ieee754/ldbl-128ibm-compat/Versions        |  78 +++++
 .../ldbl-128ibm-compat/ieee128-argp_error.c        |  30 ++
 .../ldbl-128ibm-compat/ieee128-argp_failure.c      |  32 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-asprintf.c  |  35 +++
 .../ldbl-128ibm-compat/ieee128-asprintf_chk.c      |  38 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-dprintf.c   |  34 +++
 .../ldbl-128ibm-compat/ieee128-dprintf_chk.c       |  38 +++
 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-err.c   |  93 ++++++
 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-error.c |  51 ++++
 .../ieee754/ldbl-128ibm-compat/ieee128-fprintf.c   |  34 +++
 .../ldbl-128ibm-compat/ieee128-fprintf_chk.c       |  38 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-fscanf.c    |  34 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-fwprintf.c  |  35 +++
 .../ldbl-128ibm-compat/ieee128-fwprintf_chk.c      |  38 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-fwscanf.c   |  35 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-printf.c    |  35 +++
 .../ldbl-128ibm-compat/ieee128-printf_chk.c        |  38 +++
 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-scanf.c |  34 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-snprintf.c  |  35 +++
 .../ldbl-128ibm-compat/ieee128-snprintf_chk.c      |  42 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-sprintf.c   |  35 +++
 .../ldbl-128ibm-compat/ieee128-sprintf_chk.c       |  42 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-sscanf.c    |  38 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-swprintf.c  |  36 +++
 .../ldbl-128ibm-compat/ieee128-swprintf_chk.c      |  42 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-swscanf.c   |  40 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-vasprintf.c |  27 ++
 .../ldbl-128ibm-compat/ieee128-vasprintf_chk.c     |  31 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vdprintf.c  |  26 ++
 .../ldbl-128ibm-compat/ieee128-vdprintf_chk.c      |  30 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vfprintf.c  |  26 ++
 .../ldbl-128ibm-compat/ieee128-vfprintf_chk.c      |  30 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vfscanf.c   |  26 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vfwprintf.c |  27 ++
 .../ldbl-128ibm-compat/ieee128-vfwprintf_chk.c     |  31 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vfwscanf.c  |  27 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vprintf.c   |  27 ++
 .../ldbl-128ibm-compat/ieee128-vprintf_chk.c       |  30 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vscanf.c    |  26 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vsnprintf.c |  28 ++
 .../ldbl-128ibm-compat/ieee128-vsnprintf_chk.c     |  34 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-vsprintf.c  |  27 ++
 .../ldbl-128ibm-compat/ieee128-vsprintf_chk.c      |  34 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-vsscanf.c   |  29 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vswprintf.c |  28 ++
 .../ldbl-128ibm-compat/ieee128-vswprintf_chk.c     |  34 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-vswscanf.c  |  31 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vwprintf.c  |  27 ++
 .../ldbl-128ibm-compat/ieee128-vwprintf_chk.c      |  30 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-vwscanf.c   |  27 ++
 .../ieee754/ldbl-128ibm-compat/ieee128-wprintf.c   |  35 +++
 .../ldbl-128ibm-compat/ieee128-wprintf_chk.c       |  38 +++
 .../ieee754/ldbl-128ibm-compat/ieee128-wscanf.c    |  35 +++
 .../ldbl-128ibm-compat/test-argp-error-ibm128.c    |   1 +
 .../ldbl-128ibm-compat/test-argp-error-ieee128.c   |   1 +
 .../test-argp-error-ldbl-compat.c                  |   3 +
 .../test-argp-error-ldbl-compat.sh                 |  46 +++
 .../ldbl-128ibm-compat/test-argp-failure-ibm128.c  |   1 +
 .../ldbl-128ibm-compat/test-argp-failure-ieee128.c |   1 +
 .../test-argp-failure-ldbl-compat.c                |   3 +
 .../test-argp-failure-ldbl-compat.sh               |  45 +++
 .../ldbl-128ibm-compat/test-argp-ldbl-compat.c     |  69 +++++
 .../ieee754/ldbl-128ibm-compat/test-err-ibm128.c   |   1 +
 .../ieee754/ldbl-128ibm-compat/test-err-ieee128.c  |   1 +
 .../ldbl-128ibm-compat/test-err-ldbl-compat.c      |   3 +
 .../ldbl-128ibm-compat/test-err-ldbl-compat.sh     |  44 +++
 .../ldbl-128ibm-compat/test-error-ldbl-compat.c    |  45 +++
 .../ldbl-128ibm-compat/test-error1-ibm128.c        |   1 +
 .../ldbl-128ibm-compat/test-error1-ieee128.c       |   1 +
 .../ldbl-128ibm-compat/test-error1-ldbl-compat.c   |   3 +
 .../ldbl-128ibm-compat/test-error2-ibm128.c        |   1 +
 .../ldbl-128ibm-compat/test-error2-ieee128.c       |   1 +
 .../ldbl-128ibm-compat/test-error2-ldbl-compat.c   |   3 +
 .../ieee754/ldbl-128ibm-compat/test-errx-ibm128.c  |   1 +
 .../ieee754/ldbl-128ibm-compat/test-errx-ieee128.c |   1 +
 .../ldbl-128ibm-compat/test-errx-ldbl-compat.c     |   3 +
 .../ldbl-128ibm-compat/test-printf-chk-ibm128.c    |   1 +
 .../ldbl-128ibm-compat/test-printf-chk-ieee128.c   |   1 +
 .../test-printf-chk-ldbl-compat.c                  | 142 +++++++++
 .../test-printf-chk-ldbl-compat.sh                 |  64 ++++
 .../ldbl-128ibm-compat/test-printf-ibm128.c        |   1 +
 .../ldbl-128ibm-compat/test-printf-ieee128.c       |   1 +
 .../ldbl-128ibm-compat/test-printf-ldbl-compat.c   | 135 +++++++++
 .../ldbl-128ibm-compat/test-printf-ldbl-compat.sh  |  64 ++++
 .../ieee754/ldbl-128ibm-compat/test-scanf-ibm128.c |   1 +
 .../ldbl-128ibm-compat/test-scanf-ieee128.c        |   1 +
 .../test-scanf-ldbl-compat-template.c              | 117 ++++++++
 .../ldbl-128ibm-compat/test-scanf-ldbl-compat.c    |  10 +
 .../ldbl-128ibm-compat/test-scanf-ldbl-compat.sh   |  63 ++++
 .../ieee754/ldbl-128ibm-compat/test-verr-ibm128.c  |   1 +
 .../ieee754/ldbl-128ibm-compat/test-verr-ieee128.c |   1 +
 .../ldbl-128ibm-compat/test-verr-ldbl-compat.c     |   3 +
 .../ieee754/ldbl-128ibm-compat/test-verrx-ibm128.c |   1 +
 .../ldbl-128ibm-compat/test-verrx-ieee128.c        |   1 +
 .../ldbl-128ibm-compat/test-verrx-ldbl-compat.c    |   3 +
 .../ieee754/ldbl-128ibm-compat/test-warn-ibm128.c  |   1 +
 .../ieee754/ldbl-128ibm-compat/test-warn-ieee128.c |   1 +
 .../ldbl-128ibm-compat/test-warn-ldbl-compat.c     |  61 ++++
 .../ldbl-128ibm-compat/test-warn-ldbl-compat.sh    |  50 ++++
 .../ldbl-128ibm-compat/test-wprintf-chk-ibm128.c   |   1 +
 .../ldbl-128ibm-compat/test-wprintf-chk-ieee128.c  |   1 +
 .../test-wprintf-chk-ldbl-compat.c                 |  89 ++++++
 .../test-wprintf-chk-ldbl-compat.sh                |  52 ++++
 .../ldbl-128ibm-compat/test-wprintf-ibm128.c       |   1 +
 .../ldbl-128ibm-compat/test-wprintf-ieee128.c      |   1 +
 .../ldbl-128ibm-compat/test-wprintf-ldbl-compat.c  |  89 ++++++
 .../ldbl-128ibm-compat/test-wprintf-ldbl-compat.sh |  52 ++++
 .../ldbl-128ibm-compat/test-wscanf-ibm128.c        |   1 +
 .../ldbl-128ibm-compat/test-wscanf-ieee128.c       |   1 +
 .../ldbl-128ibm-compat/test-wscanf-ldbl-compat.c   |  10 +
 .../powerpc/powerpc64/le/ldbl-128ibm-compat-abi.h  |   8 +
 122 files changed, 3745 insertions(+), 58 deletions(-)
 create mode 100644 argp/argpP.h
 create mode 100644 misc/errP.h
 create mode 100644 misc/errorP.h
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/Makefile
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-argp_error.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-argp_failure.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-asprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-asprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-dprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-dprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-err.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-error.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fwprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fwprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fwscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-printf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-scanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-snprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-snprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-swprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-swprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-swscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vasprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vasprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vdprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vdprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfwprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfwprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfwscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vsnprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vsnprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vsprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vsprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vsscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vswprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vswprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vswscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vwprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vwprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vwscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-wprintf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-wprintf_chk.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/ieee128-wscanf.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-error-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-error-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-error-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-error-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-failure-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-failure-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-failure-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-failure-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-argp-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-err-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-err-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-err-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-err-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error1-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error1-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error1-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error2-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error2-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-error2-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-errx-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-errx-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-errx-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-chk-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-chk-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-chk-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-chk-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-printf-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat-template.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-verr-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-verr-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-verr-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-verrx-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-verrx-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-verrx-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-warn-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-warn-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-warn-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-warn-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-chk-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-chk-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-chk-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-chk-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-ldbl-compat.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wprintf-ldbl-compat.sh
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ibm128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ieee128.c
 create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ldbl-compat.c
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ldbl-128ibm-compat-abi.h

-- 
2.14.4

Comments

Joseph Myers June 21, 2018, 4:44 p.m. | #1
On Wed, 20 Jun 2018, Gabriel F. T. Gomes wrote:

> As a follow-up to my previous message on this topic [1], this patch set

> adds more functions that need new versions on powerpc64le for the long

> double format transition.  There are functions that are still missing

> (__isoc99_*scanf, printf_size, obstack_*printf, obstack_*printf_chk,

> strfmon, as well as strfromld and strtold), thus, the redirections are


And presumably strfmon_l, strtold_l, wcstold, wcstold_l, q[efg]cvt{,_r}, 
at least.  And syslog functions.

I have a general comment on the approach for testing in these patches.  
Most of the tests seem to have a common file included in a wrapper file 
for each long double format, which makes sense.  I would suggest that 
those common files should actually be in the relevant non-sysdeps 
directories (misc/ in the case of err.h functions, for example) - and that 
the tests should be built and run generically for the default long double 
for all platforms, since after all they look like they should work for all 
platforms.  Then, the sysdeps directory would add the wrappers that are 
specifically for particular formats and the makefile code to run the tests 
for those formats (so you'd end up with each such test getting run three 
or four times for powerpc64le, for the default format and for each format 
that's explicitlyy tested).

This has the following benefits:

* It fixes the problem that err.h functions (maybe others as well) have 
zero generic test coverage, by adding some tests that do at least get 
built and run everywhere.  (The coverage would still be inadequate for 
testing most of the semantics of those functions, but that's not your 
problem to fix.)

* It makes it easy to add more -mlong-double-64 test coverage in 
sysdeps/ieee754/ldbl-opt (again not your problem, except in the cases, 
such as for err.h, where adding the redirections for IEEE long double also 
means adding the missing redirections for -mlong-double-64), as wrapper 
files and makefile logic could be added in that directory that reuse the 
main test implementations outside of sysdeps.

I would also suggest that, in the cases where they don't already do so, 
it's helpful for the tests of printing functions to output e.g. two long 
double values from a single format string rather than just one - that 
would help ensure more possible failure modes are detected (if the code 
tries reading the wrong one of double and IBM long double from the 
arguments, that might sometimes just happen to work when there's only a 
single argument).

-- 
Joseph S. Myers
joseph@codesourcery.com