[PATCH] arm/arm64: smccc: Use xN for arm64 register constraints with clang
Matthias Kaehlcke
mka at chromium.org
Thu Mar 22 15:44:56 PDT 2018
El Thu, Mar 22, 2018 at 10:26:18PM +0000 Nick Desaulniers ha dit:
> Note that a patch in this form has previously been implemented by:
>
> Andrey Konovalov <andreyknvl at google.com>:
> https://gist.github.com/xairy/ee11682ea86044a45c0291c528cd936f
>
> and another by:
>
> Greg Hackmann <ghackmann at google.com>:
> https://android-review.googlesource.com/c/kernel/common/+/645181
>
> If you used either as a reference, you may want to credit them with a
> `Suggested-by:` in the commit message.
Not really, but I think I prefer Greg's version over mine and might
use it in a respin if nobody raises objections.
> On Thu, Mar 22, 2018 at 2:28 PM Matthias Kaehlcke <mka at chromium.org> wrote:
> > +#ifndef __clang__
> > +#define __reg__ "r"
> > +#else
> > +#define __reg__ "x"
> > +#endif
>
> Can this be flipped to #ifdef __clang__ ? having an if...else where the
> conditional negated is kind of funny.
Sure, my thought was "common case first", but I agree that the negated
condition isn't ideal either.
More information about the linux-arm-kernel
mailing list