[patch] tc-h8300.c: Don't output a wrong warning.
Nick Clifton
nickc@cambridge.redhat.com
Fri Jan 18 17:02:00 GMT 2002
Hi Kazu,
> mov.w r2,@0xff8000:16
>
> In h8 assembly language, when address:16 is given, the effective
> address is computed as follows.
>
> 0x000000 + address if 0x0000 <= address <= 0x7fff
> 0xff0000 + address if 0x8000 <= address <= 0xffff
>
> People often give full 24-bit address like 0xff8000 and expect it to
> be truncated to 0x8000. The patch eliminates the warning when the
> truncation is done correctly.
Surely if :16 is used a 16-bit address should be expected. Giving a
24-bit address is, I would have thought, at least technically wrong.
I can understand how programmers might want to be lazy and use :16
instead of :24, but I think that a warning is warranted. Maybe if the
warning was only enabled if a command line option was given, then
people would be happier ?
Cheers
Nick
More information about the Binutils
mailing list