This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: m68hc11 %hi relocate problem with carry
- From: Richard Henderson <rth at redhat dot com>
- To: James Murray <jsm at jsm-net dot demon dot co dot uk>
- Cc: binutils at sourceware dot org
- Date: Fri, 02 Mar 2012 12:40:38 -0800
- Subject: Re: m68hc11 %hi relocate problem with carry
- Authentication-results: mr.google.com; spf=pass (google.com: domain of rth7680@gmail.com designates 10.52.173.179 as permitted sender) smtp.mail=rth7680@gmail.com; dkim=pass header.i=rth7680@gmail.com
- References: <1330716324.30775.106.camel@jsm2>
On 03/02/2012 11:25 AM, James Murray wrote:
> I've found what appears to be a bug (or at least a limitation) when
> using a %hi assembler directive in m68hc11. This is supposed to return
> the high byte of the resolved symbol, but if the low byte overflows, the
> carry is missed.
>
> Could someone point me at some example code in other targets that I
> could study in order to fix m68hc11 ?
Some examples are R_ALPHA_GPREL{HIGH,LOW} and R_PPC_ADDR16_{LO,HA}.
Note especially that R_PPC_ADDR16_HI is different from HA, in that
HI does *not* assume carry, but HA does.
r~