> -----Original Message-----
> From: 
> [email protected] 
> [mailto:avr-libc-dev-bounces+eweddington=cso.atmel....@nongnu.
> org] On Behalf Of Joerg Wunsch
> Sent: Friday, February 06, 2009 4:22 PM
> To: [email protected]
> 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


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to