avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: HutchinsonAndy
Subject: RE: [avr-gcc-list] gcc prolog incorrect?
Date: Sun, 06 Mar 2005 23:11:34 -0500

No - that's obviously correct (perhasp I should have stated that)

Check out what happens if ISR occurs just after we save SREG to tmp_reg.


"Larry Barello" <address@hidden> wrote:

>Interrupts are not enabled until one cycle *after* the enabling instruction,
>so the code, below works.
>
>-----Original Message-----
>From: address@hidden
>
>Is it possible that gcc prolog is incorrect?
>
>  69 000a 0FB6              in __tmp_reg__,__SREG__
>  70 000c F894              cli
>  71 000e DEBF              out __SP_H__,r29
>  72 0010 0FBE              out __SREG__,__tmp_reg__
>  73 0012 CDBF              out __SP_L__,r28
>
>This is the code used to adjust the stack pointer for a regular function
>with interrupts active. Basically it turns of interupts so it can chnage
>both bytes of SP without a problem.
>
>But saved BEFORE interrupts are disabled. Doesn't that mean that if
>interrupts were disabled during ISR, a function could re-enabled them when
>SREG is restored?
>
>


-- 
Andy Hutchinson


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp




reply via email to

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