This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AVR indirect_jump addresses limited to 16 bits
Marek Michalkiewicz <marekm@amelek.gda.pl> writes:
> On Sun, Mar 20, 2005 at 04:29:01PM -0800, Richard Henderson wrote:
>
> > The easiest way is to do this in the linker instead of the compiler.
> > See the xstormy16 port and how it handles R_XSTORMY16_FPTR16. This
> > has the distinct advantage that you do not commit to the creation of
> > an indirect jump until you discover that the target label is outside
> > the low 64k.
>
> Looks perfect to me. So we are not the first architecture needing
> such tricks... AVR would need 3 new relocs, used like this:
>
> .word pm16(label)
>
> ldi r30,pm16_lo8(label)
> ldi r31,pm16_hi8(label)
>
> and the linker can do the rest of the magic (add jumps in a section
> below 64K words if the label is above).
>
> Cc: to Denis, as I may need help actually implementing these changes
> (you know binutils internals much better than I do).
Richard right. Better to support this in binutils.
Right now I'm busy with CC0 to CCmode conversion.
(you must learn binutils ;)
Denis.