This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: arm-elf-as truncates branch offsets w/o warning
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: arm-elf-as truncates branch offsets w/o warning
- From: Alan Modra <alan at SPRI dot Levels dot UniSA dot Edu dot Au>
- Date: Fri, 17 Mar 2000 13:43:28 +1030 (CST)
- cc: grante at visi dot com, scottb at netwinder dot org, binutils at sourceware dot cygnus dot com
On Thu, 16 Mar 2000, Nick Clifton wrote:
> + /* Sign-extend a 24-bit number. */
> + #define SEXT24(x) ((((x) & 0xffffff) ^ (~ 0x7fffff)) + 0x800000)
> +
Hi Nick,
That looks wrong. Don't you mean
#define SEXT24(x) ((((x) & 0xffffff) ^ 0x800000) - 0x800000)
^
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>^