From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19136 invoked by alias); 1 Feb 2005 03:29:07 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 19001 invoked from network); 1 Feb 2005 03:28:57 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 1 Feb 2005 03:28:57 -0000 Received: from drow by nevyn.them.org with local (Exim 4.43 #1 (Debian)) id 1Cvoic-0005xg-T8; Mon, 31 Jan 2005 22:28:46 -0500 Date: Tue, 01 Feb 2005 03:29:00 -0000 From: Daniel Jacobowitz To: Paul Schlie Cc: Richard Sandiford , binutils@sources.redhat.com Subject: Re: Bignums and .sleb128 Message-ID: <20050201032846.GA22855@nevyn.them.org> Mail-Followup-To: Paul Schlie , Richard Sandiford , binutils@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2005-02/txt/msg00007.txt.bz2 On Mon, Jan 31, 2005 at 07:52:59PM -0500, Paul Schlie wrote: > > Daniel Jacobowitz writes: > > >> You said later that: > > >> > > >> > If we're going to use these semantics, at least the '-' case in > > >> > operand() needs to be fixed. > > >> > > >> but I wasn't sure what you meant by "these semantics". Do you mean > > >> treating bignums as signed, or treating them as unsigned? By my reading, > > >> operand()'s current handling of '-' already assumes they are signed, > > >> just like the sleb128 code does (and did ;). > > > It doesn't work, because sometimes bignums are signed and sometimes > > > they aren't. Consider -0xffffffffffff; the current code will return 1. > > > If you want to treat the input as unsigned, then you need to add a new > > > word with the sign bit. Note that with one less leading 'f', it > > > suddenly works. > > Strongly suspect that the proper idiom to is to treat all non-explicitly > negative constants as being unsigned values; where the point of confusion This discussion is about the internal representation of bignums; the user input is not ambiguous in any way. The meaning of .sleb128 0xffffffffffffffff is quite clear. -- Daniel Jacobowitz