[Top][All Lists]

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

[avr-gcc-list] Why GCC uses CLI with local variables

From: marko . panger
Subject: [avr-gcc-list] Why GCC uses CLI with local variables
Date: Fri, 05 Apr 2002 10:09:41 +0200 (CEST)
User-agent: IMP/PHP IMAP webmail program 2.2.3

Hello all!

I noticed that when I write functions with local varibales(for example a Buffer
[10]) GCC puts this varible onto the stack - normaly, but... If I examine the 
produced code a bit, I can see some kind of atomic acceses to SP. In fact GCC 
saves the SREG register, disables interrupts (with CLI) then updates the upper 
part of SP and then restores SREG.

Could somebody explain me why GCC does this ?

There is also a possibility to "disable disabling" interrupts with:
 -mno-interrupts GCC option

But still, why atomic acesses to SP ?

Any help would be appreciated !


avr-gcc-list at http://avr1.org

reply via email to

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