From: Christian Groessler <chris@groessler.org>
To: binutils@sourceware.org
Subject: Re: Elimination of all floating point code in the tiny assembler
Date: Wed, 13 Sep 2023 15:54:46 +0200 [thread overview]
Message-ID: <c4f99a38-3ab9-4808-8b08-09f2b1e10e1f@groessler.org> (raw)
In-Reply-To: <54f4f9c1-7d8c-db9c-5e77-9eb0ff974908@redhat.com>
Hello Jacob,
On 9/13/23 13:18, Nick Clifton via Binutils wrote:
>> GAS has its own floating point code in very high precision. This code
>> is quite cumbersome, and never used. All compilers emit floating point
>> numbers as 32 or 64 bit integers, so, the directives for reading
>> floating point numbers go unused.
>
> Except of course when assembling hand written assembler source code.
> You can bet that there is code out there that relies upon this feature
> of the assembler.
>
> A second point is that GAS actually has three different versions of the
> text-to-float conversion code: atof-generic.c, atof-ieee.c and atof-vax.c.
> These are to support the requirements of different architectures. Any
> replacement code would ideally remove all three of these implementations,
> although of course it would have to take care to not break anything.
>
> Another issue is that the code needs to work when running in a cross
> assembly environment. So for example it must work when running on a big
> endian host but assembling for a little endian target, or when running
> on a 32-bit host assembling for a 64-bit target.
>
> All of which is not to say "don't do this". We absolutely would be
> interested in any patches to improve/simplify the assembler. Just please
> do consider that the code needs to be portable, paranoid and pleasing.
appending to Nick's response I want to say that it's not so straight
forward.
There are different reprensations of floating point numbers. So a
generic "strtoul" doesn't help. It's dependent on the build machine and
not on the target.
regards,
chris
next prev parent reply other threads:[~2023-09-13 13:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-10 17:41 jacob navia
2023-09-13 11:18 ` Nick Clifton
2023-09-13 13:54 ` Christian Groessler [this message]
2023-09-13 14:01 ` Paul Koning
2023-09-14 7:49 ` jacob navia
2023-09-14 8:35 ` Jan Beulich
2023-09-14 11:10 ` jacob navia
2023-09-14 8:38 ` Simon Richter
2023-09-14 13:48 ` Paul Koning
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=c4f99a38-3ab9-4808-8b08-09f2b1e10e1f@groessler.org \
--to=chris@groessler.org \
--cc=binutils@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).