This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Last of the gas cleanups


"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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]