On 14.10.11 13:14, Georg-Johann Lay wrote: > 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?
With the linker inserting trampolines, and relaxation using them, compatibility is provided by I*, with EI* working only because EIND == 0, IIUC? Then emitting EI* only has a purpose if there are plans to use EIND != 0, AIUI. (And then we've bypassed the trampolines, IIUC. [1] In my mind, that raises the question: Since it's working now, why?) In the OP, concern was raised that the use of EIND is not IRQ-safe, so the trampolines should be used instead. Given that any interrupt handler has to save any registers it clobbers, then I don't immediately see how EIND should be IRQ-unsafe? (So the above could be done, but the goal is still a bit unclear, at least at this end of the pipe.) Erik [1] Or, is there still a stub in this case, to set EIND, depending on the address of the destination? (Because we still only have 16 bit pointers in avr-gcc.) -- If you understand what you're doing, you're not learning anything. - A. L. _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list