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: Jan Waclawek
Subject: Re: [avr-gcc-list] May avr-gcc emit EIJMP/EICALL?
Date: Thu, 13 Oct 2011 14:17:32 +0200

>The jump targets in jump tables from switch_case/.ctors/.dtors are located in
>lower flash and their entries are gs() and use relaxation magic to have jumping
>pads generated.

AFAIK, the linker creates the trampoline/jumptable regardless of relaxation.
It's just that in certain (in practice most) cases this process is broken 
UNLESS relax is used.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=707285#707285



>Bottom line is that there is no need to ever touch or use EI gadgets, and EI
>should be removed from the compiler like so:

As it is now, yes. But there might have been a reason for the EI back then. 

Imagine for example that all targets of indirect jumps are within one 64kW 
"segment". Then, the "segment" register EIND could be set once at the beginning 
and left so forever; and there's no need for the trampolines.

Jan




reply via email to

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