mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] ld128 math function support
@ 2022-12-08  7:56 gzh2233
  2022-12-09 21:30 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: gzh2233 @ 2022-12-08  7:56 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

Hi, all


I am trying to use ld128 in x86_64 musl and i have some problems.


Long double format is defined in arch/x86_64/bits/float.h and i am trying to
change long double relevant macros. However, many long double functions
still use double implementions(mostly "xxhl" functions). This is just a way to
make musl compile and can be a problem in some cases. Simply changing
the long double relevant macros can change ld80 into ld128 but this
problem still exists. 


Is there any official support for long double math functions?

Regards,
Zhihao Gu.


[-- Attachment #2: Type: text/html, Size: 1076 bytes --]

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

* Re: [musl] ld128 math function support
  2022-12-08  7:56 [musl] ld128 math function support gzh2233
@ 2022-12-09 21:30 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2022-12-09 21:30 UTC (permalink / raw)
  To: gzh2233; +Cc: musl

* gzh2233 <gzh1754344759@163.com> [2022-12-08 15:56:35 +0800]:
> I am trying to use ld128 in x86_64 musl and i have some problems.

that has multiple issues.

> Long double format is defined in arch/x86_64/bits/float.h and i am trying to
> change long double relevant macros. However, many long double functions
> still use double implementions(mostly "xxhl" functions). This is just a way to
> make musl compile and can be a problem in some cases. Simply changing
> the long double relevant macros can change ld80 into ld128 but this
> problem still exists. 
> 
> 
> Is there any official support for long double math functions?

musl does not support long double == float128 on x86_64.
this is part of the abi.

if you add a new abi variant where long double is float128,
that works but many float128 math functions have low quality
currently as you noticed. fixing this is significant effort.
i don't have immediate plans to fix this.

another option is to keep long double as is but add _Float128
support and f128 math functions (on all targets). such support
would require additional work and increase the size of libc.so.

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

end of thread, other threads:[~2022-12-09 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-08  7:56 [musl] ld128 math function support gzh2233
2022-12-09 21:30 ` Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).