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

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to