From: Joel Sherrill <joel@rtems.org>
To: Newlib <newlib@sourceware.org>
Subject: Revisiting More Complete long double Support
Date: Wed, 17 Aug 2022 17:06:25 -0500 [thread overview]
Message-ID: <CAF9ehCUXG5c1V0TAmJzQywu8u_mEsHhJhch03H61qsh9YuFBbw@mail.gmail.com> (raw)
Hi
I'm looking at newlib long double support again when sizeof(long double) !=
sizeof(double).
(1) Merged FreeBSD C code for long double math
FreeBSD has C code for long double math routines as default implementation:
https://github.com/freebsd/freebsd-src/tree/main/lib/msun/src
I **THINK** those will work if LDBL != DBL so that code might need the
ifdef for LDBL_EQ_DBL to pick the current newlib common implementation of
the method which just calls the normal version of the method. I code even
add the files as XXX_freebsd.c and only add
ifdef _LDBL_EQ_DBL
long double
acosl (long double x)
{
return acos(x);
}
#else
#include "acosl_freebsd.c"
#endif
which would definitely avoid edits to the FreeBSD source.
(2) More i386 assembly versions
Then there appears to be some long double methods for the i386/87 here
which newlib doesn't currently have:
https://github.com/freebsd/freebsd-src/tree/main/lib/msun/i387
Thoughts on adding this long double code from FreeBSD?
Thanks.
--joel
next reply other threads:[~2022-08-17 22:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 22:06 Joel Sherrill [this message]
2022-08-18 7:57 ` Corinna Vinschen
2022-08-18 14:49 ` Joel Sherrill
2022-08-18 19:16 ` Corinna Vinschen
2022-08-18 19:31 ` Joel Sherrill
2022-08-18 22:16 ` Joel Sherrill
2022-08-19 9:19 ` Corinna Vinschen
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=CAF9ehCUXG5c1V0TAmJzQywu8u_mEsHhJhch03H61qsh9YuFBbw@mail.gmail.com \
--to=joel@rtems.org \
--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).