From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbdAWUHV (ORCPT ); Mon, 23 Jan 2017 15:07:21 -0500 Received: from mail.kernel.org ([198.145.29.136]:56136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbdAWUHT (ORCPT ); Mon, 23 Jan 2017 15:07:19 -0500 Date: Mon, 23 Jan 2017 17:06:33 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen Cc: Jiri Olsa , linux-kernel@vger.kernel.org, Andi Kleen , Adrian Hunter Subject: Re: [PATCH 4/5] perf, tools, script: Add support for printing assembler Message-ID: <20170123200633.GA436@kernel.org> References: <20170119014150.19218-1-andi@firstfloor.org> <20170119014150.19218-5-andi@firstfloor.org> <20170123194907.GA10340@kernel.org> <20170123195521.GP26852@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170123195521.GP26852@two.firstfloor.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jan 23, 2017 at 11:55:21AM -0800, Andi Kleen escreveu: > > Do you know if there is any tool comparing the output of objdump -d to what is > > produced by a similar xed based tool? > > I'm not aware of such a tool, but could be written using the "xed" tool > in the xed distribution. However I would trust xed over objdump, It would go both ways, and I was not implying which one is "better", just checking differences in the output. > it is used widely in Intel tools with likely far more testing > than binutils > > > 4b8506 jz 0x4b84d0 74 c8 je 4b84d0 > > 4b84d0 add $0x1, %r14 add $0x1,%r14 > > 4b84d4 cmp %r14d, %ebx cmp %r14d,%ebx > > 4b84d7 jle 0x4b8530 jle 4b8530 > > 4b8530 add $0x1, %r12 add $0x1,%r12 > > 4b8534 cmp %r12d, %r13d cmp %r12d,%r13d > > 4b8537 jnle 0x4b84c2 7f 89 jg 4b84c2 > > 4b84c2 xor %r14d, %r14d xor %r14d,%r14d > > 4b84c5 test %ebx, %ebx test %ebx,%ebx > > 4b84c7 jnle 0x4b84d9 7f 10 jg 4b84d9 > > 4b84d9 movq 0x90(%r15), %rax 49 8b 87 90 00 00 00 mov 0x90(%r15),%rax > > 4b84e0 mov %r12, %rdx mov %r12,%rdx > > 4b84e3 mov %r14, %rcx mov %r14,%rcx > > 4b84e6 mov $0x2400, %esi mov $0x2400,%esi > > 4b84eb imulq (%rax), %rdx 48 0f af 10 imul (%rax),%rdx > > 4b84ef imulq 0x8(%rax), %rcx 48 0f af 48 08 imul 0x8(%rax),%rcx > > 4b84f4 add %rdx, %rax add %rdx,%rax > > 4b84f7 xor %edx, %edx xor %edx,%edx > > 4b84f9 movl 0x18(%rcx,%rax,1), %edi 8b 7c 01 18 mov 0x18(%rcx,%rax,1),%edi > > 4b84fd xor %eax, %eax xor %eax,%eax > > 4b84ff callq 0x42d990 callq 42d990 > > 4b8504 test %eax, %eax test %eax,%eax > > 4b8506 jz 0x4b84d0 74 c8 je 4b84d0 > > Yes all the differences are ok. It's just synonyms of the instructions. > > -Andi