arm-elf-as truncates branch offsets w/o warning

Alan Modra alan@SPRI.Levels.UniSA.Edu.Au
Thu Mar 16 19:10:00 GMT 2000


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)
                                                       ^
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>^



More information about the Binutils mailing list