gas/config/tc-alpha.c

Alan Modra alan@linuxcare.com.au
Sun May 14 04:42:00 GMT 2000


Is there any real reason to prefer the dangerous first form of these
macros?

extract from tc-alpha.c:

/* 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


-- 
Linuxcare.  Support for the Revolution.



More information about the Binutils mailing list