avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] May avr-gcc emit EIJMP/EICALL?


From: Georg-Johann Lay
Subject: Re: [avr-gcc-list] May avr-gcc emit EIJMP/EICALL?
Date: Fri, 14 Oct 2011 16:57:40 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100302)

Jan Waclawek schrieb:
>> If I understand correctly, my changes in
>> http://gcc.gnu.org/viewcvs/trunk/gcc/config/avr/libgcc.S?r1=179760&r2=179759&pathrev=179760
>> are no good and I should rework the patch to use EI*, and instead of PUSH
>> zero_reg there should either a push of EIND or, if no RET is used to indirect
>> jump, EIJMP instead if IJMP?
> 
> Have a look at 
> http://svn.savannah.nongnu.org/viewvc/trunk/avr-libc/crt1/gcrt1.S?revision=2114&root=avr-libc&view=markup
> 
> #ifdef __AVR_3_BYTE_PC__
>       ldi     r16, hh8(pm(__vectors))
>       out     _SFR_IO_ADDR(EIND), r16
> #endif        /* __AVR_3_BYTE_PC__ */

Guess that is to help bootloader?

It conflicts with .ctors that erly on EIND = 0.

> Nevertheless, I personally would not cater in avr-gcc for those who desire to
> write function pointers or extensive switches into the bootloader. AFAIK
> there's no ready-made mechanism which would place the trampolines to upper
> space, anyway; and those who know how to modify the linker script might also
> know enough to avoid indirect jumps within bootloaders.
> 
> It should go into the documentation (avr-libc, for lack of better place), 
> though.

Yes, it should definitely be documented somewhere. What the tools can do and
what they cannot to and what the implications are.

At is appears at the moment, and in absence of an obvious catch-all fix, I
think now it is no good idea that I provide a patch and leave thing as they are
until there is a solution like 4-byte aligned addresses in binutils.

Johann

> Johann,
> 
> I think, in mistake I sent the previous response to you personally rather than
> to the forum (I don't store outgoing mails from this particular address). 
> Could
> you please repost it to the forum - with your comments attached if you wish?
> 
> Thanks,
> 
> Jan

Just click "Answer All" in your emailer.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]