[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Telling inline asm that input register is clobbered?
From: |
Georg-Johann Lay |
Subject: |
Re: [avr-gcc-list] Telling inline asm that input register is clobbered? |
Date: |
Mon, 10 Dec 2012 14:12:26 +0100 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20100302) |
Paul Sokolovsky wrote:
> Hello,
>
> I'd like to reimplement __builtin_avr_delay_cycles() function in inline
> assembly. The reason is that __builtin_avr_delay_cycles() has
> too-early operand checking, so for example
>
> static __attribute__((__always_inline__)) my_delay(int cycles)
> {
> __builtin_avr_delay_cycles(cycles);
> }
Would you supply a test case?
> Will still complain that __builtin_avr_delay_cycles(cycles) is not
> constant even for cases like my_delay(10).
Also consider to make the function inline and to make 'cycles' const.
Johann