From: Ingo Molnar <mingo@kernel.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Christopher Li <sparse@chrisli.org>,
virtualization@lists.linux-foundation.org,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Nadav Amit <namit@vmware.com>, Jan Beulich <JBeulich@suse.com>,
"H. Peter Anvin" <hpa@zytor.com>, Sam Ravnborg <sam@ravnborg.org>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-sparse@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>,
linux-xtensa@linux-xtensa.org, Kees Cook <keescook@chromium.org>,
Chris Zankel <chris@zankel.net>, Michael Matz <matz@suse.de>,
Borislav Petkov <bp@alien8.de>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Alok Kataria <akataria@vmware.com>,
Juergen Gross <jgross@suse.com>,
gcc@gcc.gnu.org, Richard Biener <rguenther@suse.de>,
Max Filippov <jcmvbkbc@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger
Subject: Re: PROPOSAL: Extend inline asm syntax with size spec
Date: Wed, 10 Oct 2018 08:35:36 +0200 [thread overview]
Message-ID: <20181010063536.GA124923@gmail.com> (raw)
In-Reply-To: <20181009145330.GT29268@gate.crashing.org>
* Segher Boessenkool <segher@kernel.crashing.org> wrote:
> On Mon, Oct 08, 2018 at 11:07:46AM +0200, Richard Biener wrote:
> > On Mon, 8 Oct 2018, Segher Boessenkool wrote:
> > > On Sun, Oct 07, 2018 at 03:53:26PM +0000, Michael Matz wrote:
> > > > On Sun, 7 Oct 2018, Segher Boessenkool wrote:
> > > > > On Sun, Oct 07, 2018 at 11:18:06AM +0200, Borislav Petkov wrote:
> > > > > > Now, Richard suggested doing something like:
> > > > > >
> > > > > > 1) inline asm ("...")
> > > > >
> > > > > What would the semantics of this be?
> > > >
> > > > The size of the inline asm wouldn't be counted towards the inliner size
> > > > limits (or be counted as "1").
> > >
> > > That sounds like a good option.
> >
> > Yes, I also like it for simplicity. It also avoids the requirement
> > of translating the number (in bytes?) given by the user to
> > "number of GIMPLE instructions" as needed by the inliner.
>
> This patch implements this, for C only so far. And the syntax is
> "asm inline", which is more in line with other syntax.
>
> How does this look?
Cool, thanks for implementing this!
In the kernel we'd likely wrap this in some "asm_inline()" type of construct to be
compatible with older toolchains and other compilers.
Thanks,
Ingo
next prev parent reply other threads:[~2018-10-10 6:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181003213100.189959-1-namit@vmware.com>
2018-10-07 9:18 ` PROPOSAL: Extend inline asm syntax with size spec Borislav Petkov
[not found] ` <20181007091805.GA30687@zn.tnic>
[not found] ` <20181007132228.GJ29268@gate.crashing.org>
2018-10-07 14:13 ` Borislav Petkov
[not found] ` <20181007141349.GD30687@zn.tnic>
[not found] ` <20181007151427.GK29268@gate.crashing.org>
2018-10-08 5:58 ` Ingo Molnar
[not found] ` <alpine.LSU.2.21.1810071534220.7867@wotan.suse.de>
2018-10-08 6:13 ` Ingo Molnar
2018-10-08 16:24 ` David Laight
[not found] ` <20181008073128.GL29268@gate.crashing.org>
[not found] ` <alpine.LSU.2.20.1810081105350.16707@zhemvz.fhfr.qr>
[not found] ` <20181009145330.GT29268@gate.crashing.org>
2018-10-10 6:35 ` Ingo Molnar [this message]
[not found] ` <alpine.LSU.2.20.1810100909140.16707@zhemvz.fhfr.qr>
2018-10-10 7:22 ` Ingo Molnar
[not found] ` <20181010080324.GV29268@gate.crashing.org>
2018-10-10 8:19 ` Borislav Petkov
[not found] ` <20181010081906.GA5533@zn.tnic>
[not found] ` <20181010185432.GB29268@gate.crashing.org>
2018-10-10 19:14 ` Borislav Petkov
[not found] ` <20181010191427.GF5533@zn.tnic>
2018-10-13 19:33 ` Borislav Petkov
[not found] ` <alpine.LNX.2.20.13.1810132355180.13914@monopod.intra.ispras.ru>
2018-10-13 21:30 ` Borislav Petkov
2018-10-25 10:24 ` Borislav Petkov
2018-10-31 12:55 ` Peter Zijlstra
2018-10-31 13:11 ` Peter Zijlstra
2018-11-01 5:20 ` Joe Perches
[not found] ` <5f987ecbb4962b4796615928d9d71f2cf9b21a3b.camel@perches.com>
2018-11-01 9:01 ` Peter Zijlstra
2018-11-01 9:20 ` Joe Perches
[not found] ` <02085d90af8a81b69cb38e0fdd6a018f151a58d8.camel@perches.com>
2018-11-01 11:15 ` Peter Zijlstra
2018-12-27 4:47 ` Masahiro Yamada
2018-11-29 11:46 ` Masahiro Yamada
[not found] ` <CAK7LNARmrdtyE7JRAdJH_zbfvD_cej+TGLh+5KfT20o538KUcA@mail.gmail.com>
2018-11-29 13:07 ` Borislav Petkov via Virtualization
[not found] ` <alpine.LSU.2.20.1811291408400.1827@zhemvz.fhfr.qr>
2018-11-29 13:16 ` Borislav Petkov via Virtualization
[not found] ` <20181129122500.GX23873@gate.crashing.org>
2018-11-30 9:06 ` Boris Petkov via Virtualization
[not found] ` <CF26ACBE-500C-47E8-B79D-E1ABE938031D@alien8.de>
[not found] ` <20181130131633.GU23873@gate.crashing.org>
2018-12-10 8:16 ` Masahiro Yamada
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=20181010063536.GA124923@gmail.com \
--to=mingo@kernel.org \
--cc=JBeulich@suse.com \
--cc=akataria@vmware.com \
--cc=bp@alien8.de \
--cc=chris@zankel.net \
--cc=gcc@gcc.gnu.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jcmvbkbc@gmail.com \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger \
--cc=linux-sparse@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=matz@suse.de \
--cc=mingo@redhat.com \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=rguenther@suse.de \
--cc=sam@ravnborg.org \
--cc=segher@kernel.crashing.org \
--cc=sparse@chrisli.org \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.com \
/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 NNTP newsgroup(s).