From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11156 invoked by alias); 1 Feb 2005 00:22:56 -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 10885 invoked from network); 1 Feb 2005 00:22:29 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 1 Feb 2005 00:22:29 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 042CF13E251C; Tue, 1 Feb 2005 01:22:26 +0100 (CET) To: "Ben Elliston" Cc: binutils@sources.redhat.com Subject: Re: Last of the gas cleanups References: <20050131234205.GA4941@namadgi> From: Andreas Schwab X-Yow: If our behavior is strict, we do not need fun! Date: Tue, 01 Feb 2005 00:22:00 -0000 In-Reply-To: <20050131234205.GA4941@namadgi> (Ben Elliston's message of "Tue, 1 Feb 2005 10:42:05 +1100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2005-02/txt/msg00002.txt.bz2 "Ben Elliston" writes: > Index: config/tc-alpha.c > =================================================================== > RCS file: /home/bje/src-cvs/src/gas/config/tc-alpha.c,v > retrieving revision 1.63 > diff -u -p -u -r1.63 tc-alpha.c > --- config/tc-alpha.c 31 Jan 2005 23:18:25 -0000 1.63 > +++ config/tc-alpha.c 31 Jan 2005 23:39:58 -0000 > @@ -159,30 +159,17 @@ struct alpha_macro > /* XXX: The non-shift version appears to trigger a compiler bug when > cross-assembling from x86 w/ gcc 2.7.2. */ > > -#if 1 > #define range_signed_16(x) \ > (((offsetT) (x) >> 15) == 0 || ((offsetT) (x) >> 15) == -1) > #define range_signed_32(x) \ > (((offsetT) (x) >> 31) == 0 || ((offsetT) (x) >> 31) == -1) > -#else > -#define range_signed_16(x) ((offsetT) (x) >= -(offsetT) 0x8000 && \ > - (offsetT) (x) <= (offsetT) 0x7FFF) > -#define range_signed_32(x) ((offsetT) (x) >= -(offsetT) 0x80000000 && \ > - (offsetT) (x) <= (offsetT) 0x7FFFFFFF) > -#endif > > /* Macros for sign extending from 16- and 32-bits. */ > /* XXX: The cast macros will work on all the systems that I care about, > but really a predicate should be found to use the non-cast forms. */ > > -#if 1 > #define sign_extend_16(x) ((short) (x)) > #define sign_extend_32(x) ((int) (x)) > -#else > -#define sign_extend_16(x) ((offsetT) (((x) & 0xFFFF) ^ 0x8000) - 0x8000) > -#define sign_extend_32(x) ((offsetT) (((x) & 0xFFFFFFFF) \ > - ^ 0x80000000) - 0x80000000) > -#endif These should probably go the other way round. The disabled alternatives are more portable in the long run. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."