[lkml]   [2020]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] x86/asm updates for v5.10
On Mon, Oct 12, 2020 at 12:24 PM Uros Bizjak <> 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?


 \ /
  Last update: 2020-10-12 21:34    [W:0.078 / U:2.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site