[Patch,avr] Implement PR56254

Georg-Johann Lay avr@gjlay.de
Fri Feb 8 12:53:00 GMT 2013

This adds variable delays to __builtin_avr_delay_cycles.

Is this okay?


	PR target/56254
	* config/avr/avr.c (avr_expand_builtin)	<AVR_BUILTIN_DELAY_CYCLES>:
	Expand to delay_cycles for non-const delays.
	* config/avr/avr.md (delay_cycles): New expander.
	(*delay_cycles.libgcc): New insn.
	* config/avr/builtins.def (DELAY_CYCLES) <LIBNAME>: Set to
	* doc/extend.texi (AVR Built-in Functions)
	<__builtin_avr_delay_cycles>: Adjust documentation.

	PR target/56254
	* config/avr/t-avr (LIB1ASMFUNCS): Add _delay_cycles.
	* config/avr/lib1funcs.S (__delay_cycles): Implement it.
	(skip): New macro.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: var-delay.diff
Type: text/x-patch
Size: 4868 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130208/244fc0bf/attachment.bin>

More information about the Gcc-patches mailing list