public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Revisiting More Complete long double Support
@ 2022-08-17 22:06 Joel Sherrill
  2022-08-18  7:57 ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Sherrill @ 2022-08-17 22:06 UTC (permalink / raw)
  To: Newlib

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-19  9:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17 22:06 Revisiting More Complete long double Support Joel Sherrill
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

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).