Re: [GIT PULL] x86/asm changes for v5.6

From: Linus Torvalds
Date: Wed Jan 29 2020 - 13:57:06 EST


On Wed, Jan 29, 2020 at 10:34 AM Borislav Petkov <bp@xxxxxxx> wrote:
>
> On Wed, Jan 29, 2020 at 09:40:58AM -0800, Linus Torvalds wrote:
>
> > So I'm just hand-waving. Maybe there was some simpler explanation
> > (like me just picking the wrong instructions when I did the rough
> > conversion and simply breaking things with some stupid bug).
>
> Looks like it. So I did this:

Ahh, yeah, good spotting.

And I wonder if we should just make that

movq %rdx, %rcx

unconditional, because all the cases basically want it anyway (the
"label 4" case does it after the jump).

It might even make sense to move it to the top of __memmove, depending
on how well those early instructions decode.

Linus