[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue
From: |
Petr Hluzín |
Subject: |
Re: [Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue |
Date: |
Thu, 22 Mar 2012 22:51:27 +0100 |
On 19 March 2012 18:50, Michael Hennebry <address@hidden> wrote:
> Neither the original nor the proposed code works as advertised.
> ms is supposed to be tenths of milliseconds, so I renamed it.
>
> // Delay in 1/10's of a millisecond
> // won't work with -O0, use -O1 for debugging
> void msleep(INT16U ms10) { for( ; ms10; --ms10) _delay_ms(0.1); } }
>
Fix committed, see
http://git.savannah.gnu.org/cgit/simulavr.git/commit/?id=23ba1114d63ed51d10eae3814851ae8c428ba94b
The way simulation works has no effect, the avr-libc works well when
it (gcc actually) rejects non-constatnt delay. (Although I do not like
the float-point op in the delay, it makes -O0 more painful.)
--
Petr Hluzin