From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Subject: Re: [musl] roundf() (and round(), and ...)
Date: Wed, 26 Jun 2024 05:19:47 +0200 [thread overview]
Message-ID: <ZnuI08bfAEuhPu5F@voyager> (raw)
In-Reply-To: <Pine.BSM.4.64L.2406260146510.5989@herc.mirbsd.org>
Am Wed, Jun 26, 2024 at 01:49:09AM +0000 schrieb Thorsten Glaser:
> Stories of compilers doing that abound… IIRC it was the compiler
> recognising the implementation pattern of memcpy and replacing
> that by a call to memcpy… in some libc’s that was not careful to
> use -ffreestanding memcpy implementation.
memcpy() is special, in that GCC reserves the right to create calls to
it (and memmove(), memcmp(), and memset()) even in freestanding mode. It
doesn't do that for any other builtin. Your only options are to write
those functions in assembler, or write them in C and constantly curate
the options needed to compile the functions so that no recursive calls
happen.
> 15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)
$ ./hw > /dev/full && echo FAIL || echo PASS
And you wouldn't believe how many implementations fail that.
Ciao,
Markus
next prev parent reply other threads:[~2024-06-26 3:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 1:48 Damian McGuckin
2024-06-18 12:23 ` Szabolcs Nagy
2024-06-18 12:40 ` Damian McGuckin
2024-06-19 7:09 ` Damian McGuckin
2024-06-19 8:17 ` Damian McGuckin
2024-06-19 18:58 ` Szabolcs Nagy
2024-06-19 23:20 ` Rich Felker
2024-06-21 8:12 ` Damian McGuckin
2024-06-21 8:16 ` Damian McGuckin
2024-06-23 18:33 ` Rich Felker
2024-06-25 3:41 ` Damian McGuckin
2024-06-25 19:09 ` Markus Wichmann
2024-06-25 22:24 ` Damian McGuckin
2024-06-25 22:28 ` enh
2024-06-25 23:35 ` Rich Felker
2024-06-26 10:36 ` enh
2024-06-26 15:23 ` Rich Felker
2024-06-26 1:49 ` Thorsten Glaser
2024-06-26 3:19 ` Markus Wichmann [this message]
2024-06-26 3:43 ` Thorsten Glaser
2024-06-26 14:11 ` Markus Wichmann
2024-06-26 15:25 ` Rich Felker
2024-06-30 4:32 ` Damian McGuckin
2024-06-26 10:38 ` enh
2024-06-25 22:55 ` Damian McGuckin
2024-06-25 23:37 ` Rich Felker
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=ZnuI08bfAEuhPu5F@voyager \
--to=nullplan@gmx.net \
--cc=musl@lists.openwall.com \
/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.
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).