public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Renato Golin <renato.golin@linaro.org>
Cc: Matt Thomas <matt@3am-software.com>,
	 "binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: GAS .fpu directive
Date: Thu, 28 Aug 2014 11:05:00 -0000	[thread overview]
Message-ID: <53FF0CF5.3050506@arm.com> (raw)
In-Reply-To: <CAMSE1kcY8DFgbv7XPTYTy5CFezvSM_XTi4EwD-oVv3b7FxSibQ@mail.gmail.com>

On 27/08/14 18:48, Renato Golin wrote:
> On 27 August 2014 17:41, Richard Earnshaw <rearnsha@arm.com> wrote:
>> It depends on whether "incorrect" here means "if you don't know what
>> you're doing you can foul things up; but if you're careful, this is very
>> powerful", or whether it means, "this is fundamentally broken".
> 
> The difference between "powerful" and "broken" is if you hit the edge
> cases or not. The C++ standard has some clear rules about undefined,
> unspecified or implementation defined behaviour, and I believe this
> case is of a similar trait. All I'm asking is to acknowledge that this
> is undefined and that users should be made aware of the problems, at
> least via a warning. In my view, a tool is fundamentally broken if it
> allows broken edge cases to pass all checks, and that's exactly what
> both assemblers are doing in this case.
> 
> The one fundamentally broken issue is the context. It seems that Power
> has the ability to push/pop features, which fixes it. We don't. I'm
> trying to mitigate the issues by warning the user on dangerous
> behaviour, and later on to restrict usage (or at least the context) to
> a more sane semantics.
> 
> Whether the latter is done or not should not stop the former from
> being done. I can't see how a warning on multiple directives would
> hurt anything, to be honest.
> 

Because it's partial at best and some folks like to consider warnings as
fatal.  Consider the use case of

gas -mfpu=neon

then having .fpu vfpv3 inside the code.  Are you going to warn for that
as well?  If not, why not?  But this is a very practical case where the
code has to work and a warning would be incorrect.

Next consider cases where the assembler has built-in defaults.

Finally, there's the case where no instructions are emitted between two
.fpu directives (or code is emitted, but the directive has no effect on
that code).  Are you going to rule that out as well?

As I say, this is all quite complex and making changes without working
through all the use cases is potentially going to cause more problems
than it solves.

R.

> 
>> What I don't want to see is someone tinkering with what is clearly a
>> fragile API and causing problems for existing toolchains without having
>> worked through the issues.
> 
> That's why I sent the email to the list, to collect ideas and more
> edge cases. I've done the homework before contacting the list, but I
> can't possibly do that to all architectures on my own, and I'm not
> experienced enough to do that comprehensively even for ARM, without
> resorting to people like you to validate my findings.
> 
> I really appreciate your support and I understand that this is not
> high priority.
> 
> cheers,
> --renato
> 


  reply	other threads:[~2014-08-28 11:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 18:54 Renato Golin
2014-08-20 15:44 ` Nicholas Clifton
2014-08-20 15:57   ` Renato Golin
2014-08-20 16:17   ` Peter Bergner
2014-08-20 16:22   ` Richard Earnshaw
2014-08-20 16:36     ` Renato Golin
2014-08-20 16:51     ` Peter Bergner
2014-08-20 18:02       ` Renato Golin
2014-08-20 19:14         ` Peter Bergner
2014-08-20 19:18           ` Renato Golin
2014-08-21  7:32             ` Matthew Fortune
2014-08-21  8:17               ` Renato Golin
2014-08-21  9:02                 ` Matthew Fortune
2014-08-21  9:20                   ` Renato Golin
2014-08-22 14:21                     ` Renato Golin
2014-08-26  9:13                       ` Will Newton
2014-08-26  9:45                         ` Renato Golin
2014-08-26 22:47                           ` Renato Golin
2014-08-27  0:55                   ` Matt Thomas
2014-08-27  9:56                     ` Matthew Fortune
2014-08-27 16:23                     ` Renato Golin
2014-08-27 16:41                       ` Richard Earnshaw
2014-08-27 17:48                         ` Renato Golin
2014-08-28 11:05                           ` Richard Earnshaw [this message]
2014-08-28 12:07                             ` Renato Golin
2014-08-28 12:29                               ` Richard Earnshaw
2014-08-28 13:23                                 ` Renato Golin

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=53FF0CF5.3050506@arm.com \
    --to=rearnsha@arm.com \
    --cc=binutils@sourceware.org \
    --cc=matt@3am-software.com \
    --cc=renato.golin@linaro.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).