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

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

Re: [avr-gcc-list] Bug report


From: Mike Jones
Subject: Re: [avr-gcc-list] Bug report
Date: Thu, 19 Apr 2001 11:57:31 +0600

shouldn't you define adc_flag as volatile so that it would know that this
variable will change due to events not inside this loop?

Mike

>May be there was a report before.
>
>
>Source:
>
>char adc_flag = NOT_RDY;       /* external, (i.e., in SRAM) */
>...
>...
>
>while (adc_flag == NOT_RDY);   /* wait for interrupt to set to RDY */
>
>
>asm generated:
>
>       lds r24,adc_flag        <- value is load to R24 only once
>.L33:
>       tst r24                 <- dead loop tests dead value
>       breq .L33               <- never quit the loop
>
>Label location .L33: should be before lds instruction?
>
>avr-gcc is lastest snapshot, AVR8515, -O2 (perhaps problem is from
>here, the optimizer? Let test later)
>
>KTL
>
>_______________________________________________
>avr-gcc-list mailing list
>address@hidden
>http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
>
>



reply via email to

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