[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tcg/i386: 'nop' instruction with 'lock' prefix
From: |
Pranith Kumar |
Subject: |
Re: [Qemu-devel] [PATCH] tcg/i386: 'nop' instruction with 'lock' prefix is illegal |
Date: |
Mon, 15 May 2017 10:58:52 -0400 |
On Sun, May 14, 2017 at 5:12 PM, Richard Henderson <address@hidden> wrote:
>>
> Surely you'd also want to make this change for 0x11a and 0x11b. Which would
> also simplify that code a bit.
>
> That said, there's *lots* of missing LOCK prefix checks. What brings this
> one in particular to your attention?
>
The motivation for this change is here:
https://github.com/aquynh/capstone/issues/915
Apparently LLVM generates it in certain scenarios when padding with
multi-byte nop (it shouldn't).
>From what I understand, a proper instruction like "lock; <valid inst>"
is converted to "lock; multi-byte nop; <valid inst>" due to code
alignment.
There were bugs reported regarding this:
https://bugs.chromium.org/p/nativeclient/issues/detail?id=3929
I am not sure we want to fix this, but I thought it would be easy
enough to cover this case.
Thanks,
--
Pranith