From: Joel Sherrill <joel@rtems.org>
To: Jennifer Averett <jennifer.averett@oarcorp.com>
Cc: newlib@sourceware.org
Subject: Re: [PATCH v3 0/3] Add math support for non LDBL_EQ_DBL architecture
Date: Mon, 15 May 2023 16:36:11 -0500 [thread overview]
Message-ID: <CAF9ehCWFX5f3dKOwsX9FtLdoqYVMmaY_3YtRqm-xb3VR4RermA@mail.gmail.com> (raw)
In-Reply-To: <20230505183918.3200477-1-jennifer.averett@oarcorp.com>
[-- Attachment #1: Type: text/plain, Size: 13099 bytes --]
This has been sitting for 10 days (two weekends) and has no comments? Is it
OK to merge now?
Thanks.
--joel
On Fri, May 5, 2023 at 1:39 PM Jennifer Averett <
jennifer.averett@oarcorp.com> wrote:
> Patch v3 1/3 - Used RTEMS modified <sys/endian.h>. This was based upon
> Freebsd version but modified to work with 16-bit targets.
> Patch v3 2/3 - Includes were added to resolve cygwin errors.
> Patch v3 3/3 - autogenerated newlib.hin was removed.
>
> The attached set of patches add long double support for i386, aarch64 and
> x86_64. The riscv and powerpc are supported by FreeBSD but will need more
> work to be supported by newlib. FreeBSD has separate 64 and 32 bit powerpc
> support which would have to be integrated for newlib. FreeBSD riscv support
> is 64 and there are issues with fenv.h that would have to be addressed.
>
> The first patch is FreeBSD source. Most of the source resides in three
> directories ld, ld128, and ld80. These contain the long double methods.
> The ld128 and ld80 are enabled based on the architecture. I also added
> the FreeBSD sys/endian.h file which was required to build. Finally, an
> architecture machine/_fpmath.h file was copied from FreeBSD for each
> architecture the methods are to be built with. The existence of this file
> is used to trigger the FreeBSD long double math methods to build. If the
> architecture does not have _fpmath.h the LDBL_EQ_DBL files are built
> instead.
>
> The second patch contains the modifications necessary to build in newlib.
> In FreeBSD some header files from any of the three directories are visible
> to
> all the source files. The include statements were modified so the header
> file was pulled from the required directory (e.g, “file.h” was changed to
> “ld/file.h”). The files invtrig.h and k_expl.h were created in the ld
> directory and conditionally include either the ld128 or the ld80 version of
> that header file. If the configure/makefile magic were changed it might be
> possible to adjust the include arguments to the compiler rather than the
> include statements.
>
> Also in the second patch, some of the _fpmath.h and a couple of the source
> files
> unsigned long and unsigned int were changed to fixed width types so
> different
> sized unsigned long could be accommodated. The FreeBSD files
> s_nearbyint.c,
> s_fdim.c, and scalbln.c contained integer, float and long double
> methods. The int and float methods were removed and the file names were
> changed to s_nearbyintl.c, fdiml.c and scalblnl.c to resolve conflicts.
>
> Finally, defines were add to math.h for the added architectures.
>
> These changes were checked against the FACE Conformance Test Suite.
>
> Jennifer Averett (3):
> newlib: Add FreeBSD files for non LDBL_EQ_DBL support
> newlib: Add non LDBL_EQ_DBL math support for aarch64, i386, and x86_64
> Regenerated source for adding non LDBL_EQ_DBL
>
> newlib/Makefile.in | 1463 ++++++++++++++++-
> newlib/configure | 16 +
> newlib/libc/acinclude.m4 | 3 +
> newlib/libc/include/math.h | 3 +-
> newlib/libc/include/sys/endian.h | 207 +++
> newlib/libc/machine/aarch64/machine/_fpmath.h | 64 +
> newlib/libc/machine/i386/machine/_fpmath.h | 56 +
> newlib/libc/machine/x86_64/machine/_fpmath.h | 57 +
> newlib/libm/Makefile.inc | 8 +
> newlib/libm/ld/Makefile.inc | 56 +
> newlib/libm/ld/e_acoshl.c | 89 +
> newlib/libm/ld/e_acosl.c | 87 +
> newlib/libm/ld/e_asinl.c | 77 +
> newlib/libm/ld/e_atan2l.c | 120 ++
> newlib/libm/ld/e_atanhl.c | 74 +
> newlib/libm/ld/e_coshl.c | 132 ++
> newlib/libm/ld/e_fmodl.c | 149 ++
> newlib/libm/ld/e_lgammal.c | 27 +
> newlib/libm/ld/e_remainderl.c | 40 +
> newlib/libm/ld/e_sinhl.c | 134 ++
> newlib/libm/ld/fdiml.c | 55 +
> newlib/libm/ld/fpmath.h | 82 +
> newlib/libm/ld/invtrig.h | 34 +
> newlib/libm/ld/k_expl.h | 33 +
> newlib/libm/ld/math_private.h | 941 +++++++++++
> newlib/libm/ld/s_asinhl.c | 91 +
> newlib/libm/ld/s_atanl.c | 85 +
> newlib/libm/ld/s_cbrtl.c | 143 ++
> newlib/libm/ld/s_ceill.c | 101 ++
> newlib/libm/ld/s_copysignl.c | 44 +
> newlib/libm/ld/s_cosl.c | 102 ++
> newlib/libm/ld/s_fabsl.c | 45 +
> newlib/libm/ld/s_floorl.c | 101 ++
> newlib/libm/ld/s_fmal.c | 274 +++
> newlib/libm/ld/s_fmaxl.c | 57 +
> newlib/libm/ld/s_fminl.c | 57 +
> newlib/libm/ld/s_frexpl.c | 64 +
> newlib/libm/ld/s_ilogbl.c | 54 +
> newlib/libm/ld/s_llrintl.c | 9 +
> newlib/libm/ld/s_llroundl.c | 11 +
> newlib/libm/ld/s_logbl.c | 55 +
> newlib/libm/ld/s_lrint.c | 60 +
> newlib/libm/ld/s_lrintl.c | 9 +
> newlib/libm/ld/s_lround.c | 70 +
> newlib/libm/ld/s_lroundl.c | 11 +
> newlib/libm/ld/s_modfl.c | 103 ++
> newlib/libm/ld/s_nearbyintl.c | 68 +
> newlib/libm/ld/s_nextafterl.c | 80 +
> newlib/libm/ld/s_nexttoward.c | 72 +
> newlib/libm/ld/s_nexttowardf.c | 59 +
> newlib/libm/ld/s_remquol.c | 173 ++
> newlib/libm/ld/s_rintl.c | 93 ++
> newlib/libm/ld/s_roundl.c | 64 +
> newlib/libm/ld/s_scalbnl.c | 49 +
> newlib/libm/ld/s_sinl.c | 95 ++
> newlib/libm/ld/s_tanhl.c | 174 ++
> newlib/libm/ld/s_tanl.c | 97 ++
> newlib/libm/ld/s_truncl.c | 68 +
> newlib/libm/ld/scalblnl.c | 63 +
> newlib/libm/ld128/Makefile.inc | 14 +
> newlib/libm/ld128/b_tgammal.c | 57 +
> newlib/libm/ld128/e_lgammal_r.c | 330 ++++
> newlib/libm/ld128/e_powl.c | 443 +++++
> newlib/libm/ld128/e_rem_pio2l.h | 135 ++
> newlib/libm/ld128/invtrig.c | 102 ++
> newlib/libm/ld128/invtrig.h | 115 ++
> newlib/libm/ld128/k_cosl.c | 59 +
> newlib/libm/ld128/k_expl.h | 324 ++++
> newlib/libm/ld128/k_sinl.c | 59 +
> newlib/libm/ld128/s_erfl.c | 329 ++++
> newlib/libm/ld128/s_exp2l.c | 429 +++++
> newlib/libm/ld128/s_expl.c | 326 ++++
> newlib/libm/ld128/s_logl.c | 740 +++++++++
> newlib/libm/ld80/Makefile.inc | 15 +
> newlib/libm/ld80/b_expl.c | 113 ++
> newlib/libm/ld80/b_logl.c | 375 +++++
> newlib/libm/ld80/b_tgammal.c | 422 +++++
> newlib/libm/ld80/e_lgammal_r.c | 358 ++++
> newlib/libm/ld80/e_powl.c | 662 ++++++++
> newlib/libm/ld80/e_rem_pio2l.h | 143 ++
> newlib/libm/ld80/invtrig.c | 84 +
> newlib/libm/ld80/invtrig.h | 116 ++
> newlib/libm/ld80/k_cosl.c | 78 +
> newlib/libm/ld80/k_cospil.h | 42 +
> newlib/libm/ld80/k_expl.h | 301 ++++
> newlib/libm/ld80/k_sinl.c | 62 +
> newlib/libm/ld80/k_sinpil.h | 42 +
> newlib/libm/ld80/s_cospil.c | 129 ++
> newlib/libm/ld80/s_erfl.c | 337 ++++
> newlib/libm/ld80/s_exp2l.c | 290 ++++
> newlib/libm/ld80/s_expl.c | 279 ++++
> newlib/libm/ld80/s_logl.c | 722 ++++++++
> newlib/libm/ld80/s_sinpil.c | 140 ++
> 93 files changed, 14814 insertions(+), 66 deletions(-)
> create mode 100644 newlib/libc/include/sys/endian.h
> create mode 100644 newlib/libc/machine/aarch64/machine/_fpmath.h
> create mode 100644 newlib/libc/machine/i386/machine/_fpmath.h
> create mode 100644 newlib/libc/machine/x86_64/machine/_fpmath.h
> create mode 100644 newlib/libm/ld/Makefile.inc
> create mode 100644 newlib/libm/ld/e_acoshl.c
> create mode 100644 newlib/libm/ld/e_acosl.c
> create mode 100644 newlib/libm/ld/e_asinl.c
> create mode 100644 newlib/libm/ld/e_atan2l.c
> create mode 100644 newlib/libm/ld/e_atanhl.c
> create mode 100644 newlib/libm/ld/e_coshl.c
> create mode 100644 newlib/libm/ld/e_fmodl.c
> create mode 100644 newlib/libm/ld/e_lgammal.c
> create mode 100644 newlib/libm/ld/e_remainderl.c
> create mode 100644 newlib/libm/ld/e_sinhl.c
> create mode 100644 newlib/libm/ld/fdiml.c
> create mode 100644 newlib/libm/ld/fpmath.h
> create mode 100644 newlib/libm/ld/invtrig.h
> create mode 100644 newlib/libm/ld/k_expl.h
> create mode 100644 newlib/libm/ld/math_private.h
> create mode 100644 newlib/libm/ld/s_asinhl.c
> create mode 100644 newlib/libm/ld/s_atanl.c
> create mode 100644 newlib/libm/ld/s_cbrtl.c
> create mode 100644 newlib/libm/ld/s_ceill.c
> create mode 100644 newlib/libm/ld/s_copysignl.c
> create mode 100644 newlib/libm/ld/s_cosl.c
> create mode 100644 newlib/libm/ld/s_fabsl.c
> create mode 100644 newlib/libm/ld/s_floorl.c
> create mode 100644 newlib/libm/ld/s_fmal.c
> create mode 100644 newlib/libm/ld/s_fmaxl.c
> create mode 100644 newlib/libm/ld/s_fminl.c
> create mode 100644 newlib/libm/ld/s_frexpl.c
> create mode 100644 newlib/libm/ld/s_ilogbl.c
> create mode 100644 newlib/libm/ld/s_llrintl.c
> create mode 100644 newlib/libm/ld/s_llroundl.c
> create mode 100644 newlib/libm/ld/s_logbl.c
> create mode 100644 newlib/libm/ld/s_lrint.c
> create mode 100644 newlib/libm/ld/s_lrintl.c
> create mode 100644 newlib/libm/ld/s_lround.c
> create mode 100644 newlib/libm/ld/s_lroundl.c
> create mode 100644 newlib/libm/ld/s_modfl.c
> create mode 100644 newlib/libm/ld/s_nearbyintl.c
> create mode 100644 newlib/libm/ld/s_nextafterl.c
> create mode 100644 newlib/libm/ld/s_nexttoward.c
> create mode 100644 newlib/libm/ld/s_nexttowardf.c
> create mode 100644 newlib/libm/ld/s_remquol.c
> create mode 100644 newlib/libm/ld/s_rintl.c
> create mode 100644 newlib/libm/ld/s_roundl.c
> create mode 100644 newlib/libm/ld/s_scalbnl.c
> create mode 100644 newlib/libm/ld/s_sinl.c
> create mode 100644 newlib/libm/ld/s_tanhl.c
> create mode 100644 newlib/libm/ld/s_tanl.c
> create mode 100644 newlib/libm/ld/s_truncl.c
> create mode 100644 newlib/libm/ld/scalblnl.c
> create mode 100644 newlib/libm/ld128/Makefile.inc
> create mode 100644 newlib/libm/ld128/b_tgammal.c
> create mode 100644 newlib/libm/ld128/e_lgammal_r.c
> create mode 100644 newlib/libm/ld128/e_powl.c
> create mode 100644 newlib/libm/ld128/e_rem_pio2l.h
> create mode 100644 newlib/libm/ld128/invtrig.c
> create mode 100644 newlib/libm/ld128/invtrig.h
> create mode 100644 newlib/libm/ld128/k_cosl.c
> create mode 100644 newlib/libm/ld128/k_expl.h
> create mode 100644 newlib/libm/ld128/k_sinl.c
> create mode 100644 newlib/libm/ld128/s_erfl.c
> create mode 100644 newlib/libm/ld128/s_exp2l.c
> create mode 100644 newlib/libm/ld128/s_expl.c
> create mode 100644 newlib/libm/ld128/s_logl.c
> create mode 100644 newlib/libm/ld80/Makefile.inc
> create mode 100644 newlib/libm/ld80/b_expl.c
> create mode 100644 newlib/libm/ld80/b_logl.c
> create mode 100644 newlib/libm/ld80/b_tgammal.c
> create mode 100644 newlib/libm/ld80/e_lgammal_r.c
> create mode 100644 newlib/libm/ld80/e_powl.c
> create mode 100644 newlib/libm/ld80/e_rem_pio2l.h
> create mode 100644 newlib/libm/ld80/invtrig.c
> create mode 100644 newlib/libm/ld80/invtrig.h
> create mode 100644 newlib/libm/ld80/k_cosl.c
> create mode 100644 newlib/libm/ld80/k_cospil.h
> create mode 100644 newlib/libm/ld80/k_expl.h
> create mode 100644 newlib/libm/ld80/k_sinl.c
> create mode 100644 newlib/libm/ld80/k_sinpil.h
> create mode 100644 newlib/libm/ld80/s_cospil.c
> create mode 100644 newlib/libm/ld80/s_erfl.c
> create mode 100644 newlib/libm/ld80/s_exp2l.c
> create mode 100644 newlib/libm/ld80/s_expl.c
> create mode 100644 newlib/libm/ld80/s_logl.c
> create mode 100644 newlib/libm/ld80/s_sinpil.c
>
> --
> 2.31.1
>
>
next prev parent reply other threads:[~2023-05-15 21:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 18:39 Jennifer Averett
2023-05-05 18:39 ` [PATCH v3 1/3] newlib: Add FreeBSD files for non LDBL_EQ_DBL support Jennifer Averett
2023-05-05 18:39 ` [PATCH v3 2/3] newlib: Add non LDBL_EQ_DBL math support for aarch64, i386, and x86_64 Jennifer Averett
2023-05-05 18:39 ` [PATCH v3 3/3] Regenerated source for adding non LDBL_EQ_DBL Jennifer Averett
2023-05-15 21:36 ` Joel Sherrill [this message]
2023-05-16 2:58 ` [PATCH v3 0/3] Add math support for non LDBL_EQ_DBL architecture Jeff Johnston
2023-05-17 14:59 ` Joel Sherrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAF9ehCWFX5f3dKOwsX9FtLdoqYVMmaY_3YtRqm-xb3VR4RermA@mail.gmail.com \
--to=joel@rtems.org \
--cc=jennifer.averett@oarcorp.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).