This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Deprecating basic asm in a function - What now?

On Wed, Jun 22, 2016 at 02:23:46AM -0700, David Wohlferd wrote:
> I don't have a sample of people accessing local variables, but I do have one
> where someone was using 'scratch' registers in BAIF assuming the compiler
> would just "handle it."  And before you call that guy a dummy, let me point
> out that under some compilers, that's a perfectly valid assumption for asm.
> And even if not, it may have been working "just fine" in his implementation
> for years.  Which doesn't make it right.

And how would deprecation of basic asm help with that?
People can as well use 'scratch' registers in extended asm without
mentioning them in outputs or clobbers (and there are many real-world
examples of that that sometimes happen to "work" by accident).

> On the other hand, there is no guarantee that they are actually correct
> right now.  Correct enough?  Maybe so.  But of course there's no guarantee
> that tomorrow's newest optimization won't bork some of them because it
> followed the rules and you didn't quite.

You don't have such guarantee for extended asm either, lots of
them are just ticking bombs that will fail when anything in the compiler is


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]