lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2.1 2/3] objtool,x86: Additionally decode: mov %rsp, (%reg)
On Wed, Feb 10, 2021 at 10:08:51AM +0100, Peter Zijlstra wrote:
> + /* skip nontrivial SIB */
> + if (modrm_rm == 4 && sib != 0x24)
> + break;

Hmm,, maybe that should be:

if (modrm_rm == 4 && !(sib == 0x24 && rex_b == rex_x))

Because what we have is that once we have a SIB byte, rex_b is for
sib_base and rex_x is always sib_index, and we need to ensure that
sib_base == sib_index for the trivial case.


/me changes...

\
 
 \ /
  Last update: 2021-02-10 10:35    [W:0.204 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site