Re: [PATCH v5] x86: bitops: fix build regression

2020-05-14 Thread Nick Desaulniers
Bumping for this to get reviewed+picked up. Fixes a regression I would prefer didn't ship in 5.7. On Mon, May 11, 2020 at 11:52 AM Brian Gerst wrote: > > On Fri, May 8, 2020 at 2:32 PM Nick Desaulniers > wrote: > > > > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m.

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-11 Thread Brian Gerst
On Fri, May 8, 2020 at 2:32 PM Nick Desaulniers wrote: > > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. > > It turns out that if your config tickles __builtin_constant_p via > differences in choices to inline or not, these statements produce > invalid assembly: > > $

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-11 Thread Nick Desaulniers
On Sat, May 9, 2020 at 5:20 AM Andy Shevchenko wrote: > > On Fri, May 8, 2020 at 9:35 PM Nick Desaulniers > wrote: > > > > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. > > > > It turns out that if your config tickles __builtin_constant_p via > > differences in

RE: [PATCH v5] x86: bitops: fix build regression

2020-05-10 Thread David Laight
From: Nick Desaulniers > Sent: 08 May 2020 19:32 .. > It turns out that if your config tickles __builtin_constant_p via > differences in choices to inline or not, these statements produce > invalid assembly: ... > diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h > index

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-09 Thread Brian Gerst
On Sat, May 9, 2020 at 8:20 AM Andy Shevchenko wrote: > > On Fri, May 8, 2020 at 9:35 PM Nick Desaulniers > wrote: > > > > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. > > > > It turns out that if your config tickles __builtin_constant_p via > > differences in

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-09 Thread Andy Shevchenko
On Fri, May 8, 2020 at 9:35 PM Nick Desaulniers wrote: > > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. > > It turns out that if your config tickles __builtin_constant_p via > differences in choices to inline or not, these statements produce > invalid assembly: > > $

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-08 Thread Sedat Dilek
On Sat, May 9, 2020 at 1:47 AM Jesse Brandeburg wrote: > > On Fri, 8 May 2020 13:28:35 -0700 > Nathan Chancellor wrote: > > > On Fri, May 08, 2020 at 11:32:29AM -0700, Nick Desaulniers wrote: > > > Use the `%b` "x86 Operand Modifier" to instead force register allocation > > > to select a

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-08 Thread Jesse Brandeburg
On Fri, 8 May 2020 13:28:35 -0700 Nathan Chancellor wrote: > On Fri, May 08, 2020 at 11:32:29AM -0700, Nick Desaulniers wrote: > > Use the `%b` "x86 Operand Modifier" to instead force register allocation > > to select a lower-8-bit GPR operand. This looks OK to me, I appreciate the work done to

Re: [PATCH v5] x86: bitops: fix build regression

2020-05-08 Thread Nathan Chancellor
On Fri, May 08, 2020 at 11:32:29AM -0700, Nick Desaulniers wrote: > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. > > It turns out that if your config tickles __builtin_constant_p via > differences in choices to inline or not, these statements produce > invalid

[PATCH v5] x86: bitops: fix build regression

2020-05-08 Thread Nick Desaulniers
This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. It turns out that if your config tickles __builtin_constant_p via differences in choices to inline or not, these statements produce invalid assembly: $ cat foo.c long a(long b, long c) { asm("orb\t%1, %0" : "+q"(c):