This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
gas/config/tc-alpha.c
- To: binutils at sourceware dot cygnus dot com
- Subject: gas/config/tc-alpha.c
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sun, 14 May 2000 21:42:15 +1000 (EST)
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.