From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbcLEUkO (ORCPT ); Mon, 5 Dec 2016 15:40:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42362 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbcLEUkK (ORCPT ); Mon, 5 Dec 2016 15:40:10 -0500 Date: Mon, 5 Dec 2016 14:40:09 -0600 From: Josh Poimboeuf To: Jiri Slaby Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] objtool: fix build Message-ID: <20161205204009.dw53cip5wyt5mcav@treble> References: <20161205124137.343-1-jslaby@suse.cz> <20161205124137.343-2-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161205124137.343-2-jslaby@suse.cz> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 05 Dec 2016 20:40:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 05, 2016 at 01:41:37PM +0100, Jiri Slaby wrote: > 0x8d opcode was handled twice. Fixed. > > Signed-off-by: Jiri Slaby I applied the other patch to the objtool-dwarf branch, but this one doesn't apply (the branch already has the changes this patch is trying to make). > --- > tools/objtool/arch/x86/decode.c | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c > index ca4ede5ddd8c..6011ccbf9384 100644 > --- a/tools/objtool/arch/x86/decode.c > +++ b/tools/objtool/arch/x86/decode.c > @@ -291,6 +291,20 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, > break; > } > > + if (insn.rex_prefix.nbytes && > + insn.rex_prefix.bytes[0] == 0x48 && > + insn.modrm.nbytes && insn.modrm.bytes[0] == 0x2c && > + insn.sib.nbytes && insn.sib.bytes[0] == 0x24) { > + /* lea %(rsp), %rbp */ > + *type = INSN_STACK; > + op->dest.type = OP_DEST_REG; > + op->dest.reg = CFI_BP; > + op->src.type = OP_SRC_ADD; > + op->src.reg = CFI_SP; > + op->src.offset = 0; > + break; > + } > + > if (insn.rex_prefix.nbytes && insn.modrm.nbytes && > insn.sib.nbytes && insn.rex_prefix.bytes[0] == 0x4c && > insn.modrm.bytes[0] == 0x54 && insn.sib.bytes[0] == 0x24 && > @@ -342,15 +356,6 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, > op->src.type = OP_SRC_POP; > break; > > - case 0x8d: > - if (insn.rex_prefix.nbytes && > - insn.rex_prefix.bytes[0] == 0x48 && > - insn.modrm.nbytes && insn.modrm.bytes[0] == 0x2c && > - insn.sib.nbytes && insn.sib.bytes[0] == 0x24) > - /* lea %(rsp), %rbp */ > - *type = INSN_FP_SETUP; > - break; > - > case 0x90: > *type = INSN_NOP; > break; > -- > 2.11.0 > -- Josh