[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190907131127.GH9749@gate.crashing.org>
Date: Sat, 7 Sep 2019 08:11:27 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Jakub Jelinek <jakub@...hat.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
"gcc-patches@....gnu.org" <gcc-patches@....gnu.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition
On Fri, Sep 06, 2019 at 06:04:54PM -0700, Nick Desaulniers wrote:
> On Fri, Sep 6, 2019 at 5:14 PM Segher Boessenkool
> <segher@...nel.crashing.org> wrote:
> > On Fri, Sep 06, 2019 at 04:42:58PM -0700, Nick Desaulniers via gcc-patches wrote:
> > > Just to prove my point about version checks being brittle, it looks
> > > like Rasmus' version check isn't even right. GCC supported `asm
> > > inline` back in the 8.3 release, not 9.1 as in this patch:
> >
> > Yes, I backported it so that it is available in 7.5, 8.3, and 9.1, so
> > that more users will have this available sooner. (7.5 has not been
> > released yet, but asm inline has been supported in GCC 7 since Jan 2
> > this year).
>
> Ah, ok that makes sense.
>
> How would you even write a version check for that?
I wouldn't. Please stop using that straw man. I'm not saying version
checks are good, or useful for most things. I am saying they are not.
Predefined compiler symbols to do version checking (of a feature) is
just a lesser instance of the same problem though. (And it causes its
own more or less obvious problems as well).
> > > Or was it "broken" until 9.1? Lord knows, as `asm inline` wasn't in
> > > any release notes or bug reports I can find:
> >
> > https://gcc.gnu.org/ml/gcc-patches/2019-02/msg01143.html
> >
> > It never was accepted, and I dropped the ball.
>
> Ah, ok, that's fine, so documentation was at least written. Tracking
> when and where patches land (or don't) is difficult when patch files
> are emailed around. I try to keep track of when and where our kernel
> patches land, but I frequently drop the ball there.
I keep track of most things just fine... But the release notes are part
of our web content, which is in a separate CVS repository (still nicer
than SVN :-) ), and since I don't use it very often it falls outside of
all my normal procedures.
> your preference). I'm already subscribed to more mailing lists than I
> have time to read.
>
> > But I'll try to remember, sure.
> > Not that I am involved in all such discussions myself, mind.
>
> But you _did_ implement `asm inline`. ;)
That started as just
+ /* If this asm is asm inline, count anything as minimum size. */
+ if (gimple_asm_inline_p (as_a <gasm *> (stmt)))
+ count = MIN (1, count);
(in estimate_num_insns) but then things ballooned. Like such things do.
Segher
Powered by blists - more mailing lists