Re: [GIT PULL] x86 cleanups for v5.7

From: Linus Torvalds
Date: Thu Apr 02 2020 - 13:40:35 EST


On Thu, Apr 2, 2020 at 10:24 AM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> But, TBH, I have myself wondered a couple of times, "dang, if that
> asm goto only had outputs" so I'm thinking if gcc guys are bored and
> wondering what to put in gcc11, why not this. :-)

Yeah. And there are other places where we might want to use it.

Yes, it happens to be particularly useful for exception handling where
it avoids some register pressure (that can be a bigger deal than the
trivial extra instructions) and gets rid of the fixup code in a
different segment.

But it's potentially very useful for alternatives code too (where a
fallback alternatives could be "jump out-of-line to different code
entirely").

I originally wanted it for things like cmpxchg, but getting the
condition codes out of the asm and letting the compiler generate the
jump was even better.

Linus