Re: [PATCH 3/3] objtool/x86: Fix NOP decode

From: Alexandre Chartre
Date: Thu Sep 25 2025 - 09:06:04 EST




On 9/25/25 12:42, Peter Zijlstra wrote:
On Thu, Sep 25, 2025 at 12:03:23PM +0200, Peter Zijlstra wrote:

case 0x90:
+ if (prefix != 0xf3) /* REP NOP := PAUSE */
+ insn->type = INSN_NOP;
break;

What about 0x49 0x90, which is xchg (XCHG r8,rAX) ?

I've made that:

case 0x90:
if (rex_b) /* XCHG %r8, %rax */
break;

if (prefix == 0xf3) /* REP NOP := PAUSE */
break;

insn->type = INSN_NOP;
break;



Sounds good.

Reviewed-by: Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>

alex.