[Top][All Lists]

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

Re: [avr-gcc-list] Volatile bad compiled while

From: max2009tiny
Subject: Re: [avr-gcc-list] Volatile bad compiled while
Date: Fri, 27 Nov 2009 02:02:10 -0800 (PST)

Ok thanks i use gcc 4.3.2
secondary question is if i remove volatile from code
register unsigned char lastrec asm("r8")

then while generate asm efficient but dont work why?
  a0:   88 11           cpse    r24, r8
  a2:   ff cf           rjmp    .-2             ; 0xa2 <waitACK+0x2>

and without register volatile unsigned char lastrec
make work but big code

  ac:   80 91 62 00     lds     r24, 0x0062
  b0:   98 17           cp      r25, r24
  b2:   e1 f7           brne    .-8             ; 0xac <waitACK+0x2>

I understand that gcc miss, but if register is clause to change storing
possition of var
and volatile is for "change defining on the fly" i dont understand trouble
for gcc compile this ok.

Joerg Wunsch wrote:
> max2009tiny <address@hidden> wrote:
>> Hi everybody. I make project on Tiny2313 and use
>> volatile register unsigned char lastrec asm("r8")
> "volatile register" doesn't work.
> There used to be a warning for this, which has been dropped in the
> past.  GCC 4.4 does have the warning back:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34351
> -- 
> cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL
> http://www.sax.de/~joerg/                        NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

View this message in context: 
Sent from the AVR - gcc mailing list archive at Nabble.com.

reply via email to

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