From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30160 invoked by alias); 26 Apr 2007 16:05:50 -0000 Received: (qmail 30149 invoked by uid 22791); 26 Apr 2007 16:05:49 -0000 X-Spam-Check-By: sourceware.org Received: from smtp112.sbc.mail.mud.yahoo.com (HELO smtp112.sbc.mail.mud.yahoo.com) (68.142.198.211) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 26 Apr 2007 17:05:47 +0100 Received: (qmail 92702 invoked from network); 26 Apr 2007 16:05:46 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@75.61.93.153 with login) by smtp112.sbc.mail.mud.yahoo.com with SMTP; 26 Apr 2007 16:05:45 -0000 X-YMail-OSG: 3RxvrYAVM1nhJHO392fEm.JmOqhnLjc0U9Hg9sY3ufwTeHYbYuUicpsrk3JTXs0XCmy6hHnyww-- Received: by lucon.org (Postfix, from userid 500) id 5010C46EEA5; Thu, 26 Apr 2007 09:05:44 -0700 (PDT) Date: Thu, 26 Apr 2007 16:23:00 -0000 From: "H. J. Lu" To: Jan Beulich Cc: binutils@sourceware.org Subject: Re: Why aren't we consistent on displacement in x86 disassembler? Message-ID: <20070426160544.GA14909@lucon.org> References: <20070426135749.GA9666@lucon.org> <20070426144929.GA8011@lucon.org> <4630E319.76E4.0078.0@novell.com> <20070426155426.GA14771@lucon.org> <4630E8AE.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4630E8AE.76E4.0078.0@novell.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00350.txt.bz2 On Thu, Apr 26, 2007 at 05:00:14PM +0100, Jan Beulich wrote: > >>> "H. J. Lu" 26.04.07 17:54 >>> > >On Thu, Apr 26, 2007 at 04:36:25PM +0100, Jan Beulich wrote: > >> >We can do one of > >> > > >> >1. Use decimal on all 8bit displacements and hex on all 16/32bit > >> >displacement. > >> >2. Use hex on all displacements. > >> > > >> >Any comments? > >> > >> I'd prefer option 2. Jan > > > >I have another idea. We use decimal on all displacements which > >can be fitted in 8 bits since -128 is easier to read than > >0xffffff80 and is what is in the original assembly code anyway. > > Hmm, I'd prefer hex nevertheless? How about -0x80? (In a private disassembler > library I have, I'd even use ~0x7f here when the immediate is an operand of an > instruction doing bitwise operation.) Are you suggesting we display all displacements as signed hex? It works for me. H.J.