[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] relocation truncated to fit: R_AVR_13_PCREL _asmfunc
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] relocation truncated to fit: R_AVR_13_PCREL _asmfunc |
Date: |
Wed, 7 May 2003 18:07:29 +0200 |
User-agent: |
Mutt/1.2.5i |
As Mattias Svensson wrote:
> > Use JMP instead of RJMP.
> I noted that the mega16 had JMP added to the instruction set, now I
> see why.
Even the 8 KB ATmegas do have it (the AT90S8xxx didn't), but the 8 KB
devices don't require it.
> Just for the record, and my understanding.
> rjmp is described as: PC <- PC + k +1
> and jmp as: PC <- k
> So on a at90s8535 and the like that does not have jmp the linker has to
> calculate k at every place the rjmp is used in a way that it relatively
> points to the absolute address of the function jumped to...
Yep. But it's not that much of a burden for the linker. On the pro
side, the instruction still fits into one word of flash, while the
absolute JUMP/CALL instructions (that are needed for the > 8 KB
devices unless you can be sure you're within short distance) use two
words of flash (and thus also require one more clock cycle).
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [avr-gcc-list] relocation truncated to fit: R_AVR_13_PCREL _asmfunc,
Joerg Wunsch <=