This is the mail archive of the
mailing list for the binutils project.
Re: GAS .fpu directive
- From: Renato Golin <renato dot golin at linaro dot org>
- To: Nicholas Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 20 Aug 2014 16:57:50 +0100
- Subject: Re: GAS .fpu directive
- Authentication-results: sourceware.org; auth=none
- References: <CAMSE1keWd0+uUS0fpaC3-yXsnN-z2_Bsa5anwvQAQwXgWuw_Yw at mail dot gmail dot com> <53F4C261 dot 8090900 at redhat dot com>
On 20 August 2014 16:44, Nicholas Clifton <firstname.lastname@example.org> wrote:
> Right. Basically such an sceanario is theoretically possible, but it is
> unlikely that it will ever turn up in real code.
Unfortunately, it did.
There's also an .arch_extension that has the same semantics, and
Chromium guys are assuming it's intentional because GAS supports it.
I'd really like to add the extra code to make sure we only parse it in
the header and fail if seen anywhere else, and your reply will help me
do it. Can I use it as some sort of "binutils statement" that this
should not happen?
> The real reason why the
> directive is accepted anywhere is that it was just too much bother to write
> additional code to make sure that it is only used once, and then only in an
> appropriate place. Much easier to just let it be accepted anywhere and to
> rely upon the assembler programmer or the compiler to only generate one
> instance of the directive.
I understand, but people abuse of so many things... Inline asm is
another for of abuse and we've seen so many things that cannot be
unseen... (most LLVMLinux talks/slides will show you some).
Our mission in the LLVM inline assembler is to make those hard
choices, so I'd be glad to be the naughty one to revoke that "feature"
and ask the developer to stop doing that in their sources, if we're in
sync that that's really a bad idea.
For us is just a case of splitting the parseDirective containing a big
switch into two header/body functions, and splitting the parsing into
two loops, so not a big deal.