[Top][All Lists]

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

Re: [avr-gcc-list] mcall-prologues completely broken for >128k

From: Dmitry K.
Subject: Re: [avr-gcc-list] mcall-prologues completely broken for >128k
Date: Thu, 14 May 2009 08:58:21 +1100
User-agent: KMail/1.5

On Thursday 14 May 2009 07:42, Sean D'Epagnier wrote:
> Also, there is the issue of longjmp setting EIND and not restoring it.
>  It gets a little tricky with interrupts that can potentially set EIND
> as well.

Yes, the longjmp() sets EIND.  It is impossible to restore EIND,
as the EIJMP is the *last* instruction of this function.  The
alternative is to emulate EIJMP with RET instruction.  Note, the
usage of EIJMP is the very old behavior.

IMHO, the status of EIND as 'never-change' is a doubtful design.
For example, the status 'call-scratch' is better in conjunction
the presence of option 'my-trampolines-are-at-low-memory'. (In
case of this option the compiler must not use EIND entirely).

In any case, the rules of EIND usage must be documented.


reply via email to

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