[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg2hkPc049k01fxZ0p0K3QSABi0O0uN-NHoqLa0yz-DJw@mail.gmail.com>
Date: Mon, 12 Oct 2020 12:33:49 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Uros Bizjak <ubizjak@...il.com>
Cc: Borislav Petkov <bp@...e.de>, x86-ml <x86@...nel.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] x86/asm updates for v5.10
On Mon, Oct 12, 2020 at 12:24 PM Uros Bizjak <ubizjak@...il.com> wrote:
>
> I don't think it is even possible to write to a part of a register in the asm. An example:
But this example is the *reverse* of what I worry about.
I worry about the asm writing not to a "part" of a register, but to
*more* than we told the compiler we'd write to.
If we told the compiler we're only writing to %al, then I could see
the compiler using %ah for something, and scheduling that "somethihng"
to after the inline asm that said it was only modifying the low bits.
Now, I do believe you're right that gcc (and probably clang) simply
doesn't track %ah liveness and clobbering separately from %al.
But it still stinks as a concept when this isn't actually documented
anywhere I can tell.
See my worry?
Linus
Powered by blists - more mailing lists