RE: [PATCH 1/2] compiler.h: Avoid using inline asm operand modifiers

From: David Laight
Date: Wed Nov 10 2021 - 05:39:44 EST


From: Vasily Gorbik
> Sent: 08 November 2021 15:41
>
> On Fri, Nov 05, 2021 at 09:54:18AM -0700, Josh Poimboeuf wrote:
> > On Wed, May 19, 2021 at 03:03:08PM +0200, Vasily Gorbik wrote:
> > > The expansion of annotate_reachable/annotate_unreachable on s390 will
> > > result in a compiler error if the __COUNTER__ value is high enough.
...
> > I wonder if we could go back to the original approach of providing
> > __COUNTER__ as an input to the asm, but then mask it to < 128.
...
> > * The __COUNTER__ based labels are a hack to make each instance of the macros
> > * unique, to convince GCC not to merge duplicate inline asm statements.

I've used asm comments get the same effect.
Annoyingly there isn't a standard comment delimiter.

I think you can just use a .equ (or .set) directive (to assign a value)
rather than putting a value into a 'to be discarded' section.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)