Re: [PATCH 2/2] asm inline

2018-12-05 Thread Segher Boessenkool
Hi! On Tue, Dec 04, 2018 at 03:30:47PM +, Richard Sandiford wrote: > Segher Boessenkool writes: > Hmm, so we allow top-level "asm volatile" in C++ but not C? Apparently. Evert top-level asm is effectively volatile, so this doesn't really matter; but should we try to resolve the

Re: [PATCH 2/2] asm inline

2018-12-04 Thread Richard Sandiford
Segher Boessenkool writes: > diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c > index 81c520a..9b572d7 100644 > --- a/gcc/c/c-typeck.c > +++ b/gcc/c/c-typeck.c > @@ -10315,7 +10315,7 @@ build_asm_stmt (tree cv_qualifier, tree args) > are subtly different. We use a ASM_EXPR node to represent

Re: [PATCH 2/2] asm inline

2018-12-02 Thread Marc Glisse
On Sun, 2 Dec 2018, Segher Boessenkool wrote: what is the point of !!count when we take the max with 1 on the very next line? Is it in prevision of a time when we may remove the MAX? (sorry if this was covered in previous iterations) By the way, not related to the patch, but I wonder why we

Re: [PATCH 2/2] asm inline

2018-12-02 Thread Segher Boessenkool
Hi! On Sun, Dec 02, 2018 at 06:23:23PM +0100, Marc Glisse wrote: > On Sun, 2 Dec 2018, Segher Boessenkool wrote: > > >diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c > >index 5aa782b..7e9ed99 100644 > >--- a/gcc/tree-inline.c > >+++ b/gcc/tree-inline.c > >@@ -4109,6 +4109,9 @@

Re: [PATCH 2/2] asm inline

2018-12-02 Thread Marc Glisse
On Sun, 2 Dec 2018, Segher Boessenkool wrote: diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 5aa782b..7e9ed99 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -4109,6 +4109,9 @@ estimate_num_insns (gimple *stmt, eni_weights *weights) with very long asm statements.

[PATCH 2/2] asm inline

2018-12-02 Thread Segher Boessenkool
The Linux kernel people want a feature that makes GCC pretend some inline assembler code is tiny (while it would think it is huge), so that such code will be inlined essentially always instead of essentially never. This patch lets you say "asm inline" instead of just "asm", with the result that

Re: [PATCH 2/2] asm inline

2018-11-30 Thread Richard Biener
On Tue, Oct 30, 2018 at 6:31 PM Segher Boessenkool wrote: > > The Linux kernel people want a feature that makes GCC pretend some > inline assembler code is tiny (while it would think it is huge), so > that such code will be inlined essentially always instead of > essentially never. > > This patch

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Segher Boessenkool
On Sun, Nov 11, 2018 at 04:41:19PM -0700, Martin Sebor wrote: > On 11/11/2018 03:00 PM, Segher Boessenkool wrote: > >On Sun, Nov 11, 2018 at 02:33:34PM -0700, Martin Sebor wrote: > >>On 10/30/2018 11:30 AM, Segher Boessenkool wrote: > >>>The Linux kernel people want a feature that makes GCC

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Martin Sebor
On 11/11/2018 03:00 PM, Segher Boessenkool wrote: On Sun, Nov 11, 2018 at 02:33:34PM -0700, Martin Sebor wrote: On 10/30/2018 11:30 AM, Segher Boessenkool wrote: The Linux kernel people want a feature that makes GCC pretend some inline assembler code is tiny (while it would think it is huge),

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Segher Boessenkool
On Sun, Nov 11, 2018 at 02:33:34PM -0700, Martin Sebor wrote: > On 10/30/2018 11:30 AM, Segher Boessenkool wrote: > >The Linux kernel people want a feature that makes GCC pretend some > >inline assembler code is tiny (while it would think it is huge), so > >that such code will be inlined

Re: [PATCH 2/2] asm inline

2018-11-11 Thread Martin Sebor
On 10/30/2018 11:30 AM, Segher Boessenkool wrote: The Linux kernel people want a feature that makes GCC pretend some inline assembler code is tiny (while it would think it is huge), so that such code will be inlined essentially always instead of essentially never. This patch lets you say "asm

Re: [PATCH 2/2] asm inline

2018-10-30 Thread Marek Polacek
On Tue, Oct 30, 2018 at 05:30:34PM +, Segher Boessenkool wrote: > --- a/gcc/c/c-typeck.c > +++ b/gcc/c/c-typeck.c > @@ -10064,7 +10064,7 @@ build_asm_stmt (tree cv_qualifier, tree args) > are subtly different. We use a ASM_EXPR node to represent this. */ > tree > build_asm_expr

[PATCH 2/2] asm inline

2018-10-30 Thread Segher Boessenkool
The Linux kernel people want a feature that makes GCC pretend some inline assembler code is tiny (while it would think it is huge), so that such code will be inlined essentially always instead of essentially never. This patch lets you say "asm inline" instead of just "asm", with the result that