[Top][All Lists]

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

AW: [avr-gcc-list] gcc prolog incorrect?

From: Oliver Schulz
Subject: AW: [avr-gcc-list] gcc prolog incorrect?
Date: Mon, 7 Mar 2005 22:24:16 +0100


> On Mar 7, 2005, at 8:45 AM, address@hidden wrote:
> > So what happens if we get interrupt between 69 and 70? And that 
> > interrupt disables interrupts?
> >
> In that case, the interrupt handler is broken, since when it 
> returns it should restore the interrupt mask to the value it 
> had before the interrupt was taken.
Sorry, I can not follow you. How is the interrupt handler "broken"? 

If an interrupt handler returns with the instruction "reti" the global
interrupt flag is always enabled.
In line 69 the SREG register is stored in tmp_reg (i.e. r1), which is saved
and restored by the prolog/epilog of the interrupt handler.

In any case, the interrupt handler saves and restores also the SREG
register, so I can't really see the problem...


reply via email to

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