avr-libc-dev
[Top][All Lists]
Advanced

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

RE: [avr-libc-dev] [RFC] Sleeping BOD API


From: Weddington, Eric
Subject: RE: [avr-libc-dev] [RFC] Sleeping BOD API
Date: Fri, 6 Feb 2009 16:39:21 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Joerg Wunsch
> Sent: Friday, February 06, 2009 4:22 PM
> To: address@hidden
> Subject: Re: [avr-libc-dev] [RFC] Sleeping BOD API
> 
> If you feel your version is safe, go ahead, but I've
> got the impression you weren't so confident about its safety, so that
> that triggered your question in the first place.

Well I was hoping that someone (perhaps Anatoly, or Denis or Marek [if they 
ever read this list anymore]) would know if GCC knows about the "liveness" of 
MCUCR in the register, since it chose the instruction in between the two 
__asm__ statements, i.e. I want to make sure that with the macro, gcc won't do 
something weird like:

        in r24,85-32
/* #APP */
 ;  61 "test.c" 1
        ori  r24,96
 ;  0 "" 2
/* #NOAPP */
        out 85-32,r24
/* #APP */
 ;  61 "test.c" 1
        andi  r25,-33
 ;  0 "" 2
/* #NOAPP */
        out 85-32,r25

where it chooses a different register for the second __asm__ statement and that 
different register has basically invalid data.

Eric




reply via email to

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