public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Ben Elliston" <bje@au1.ibm.com>
Cc: binutils@sources.redhat.com
Subject: Re: Last of the gas cleanups
Date: Tue, 01 Feb 2005 00:22:00 -0000	[thread overview]
Message-ID: <je3bwh2koy.fsf@sykes.suse.de> (raw)
In-Reply-To: <20050131234205.GA4941@namadgi> (Ben Elliston's message of "Tue, 1 Feb 2005 10:42:05 +1100")

"Ben Elliston" <bje@au1.ibm.com> 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."

  reply	other threads:[~2005-02-01  0:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31 23:40 Ben Elliston
2005-02-01  0:22 ` Andreas Schwab [this message]
2005-02-01  2:44   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=je3bwh2koy.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=binutils@sources.redhat.com \
    --cc=bje@au1.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).