2011/7/4 Georg-Johann Lay <a...@gjlay.de>: > The current implementation of __builtin_avr_fmul/fmuls/fmulsu has a > gap if no hardware multiplier is available. > > This patch closes that gap by providing libgcc implementations named > __fmul, __fmuls resp. __fmulsu. > > The implementations yield the same result as respective FMUL* > instructions and have been testes against these instructions for all > possible combinations of input values on an atmega88 device. > > Johann > > > * doc/extend.texi (AVR Built-in Functions): Update documentation > of __builtin_avr_fmul*. > * config/avr/avr.c (avr_init_builtins): Don't depend on > AVR_HAVE_MUL. > * config/avr/avr-c.c (avr_cpu_cpp_builtins): Ditto. > * config/avr/avr.md (fmul): Rename to fmul_insn. > (fmuls): Rename to fmuls_insn. > (fmulsu): Rename to fmulsu_insn. > (fmul,fmuls,fmulsu): New expander. > (*fmul.call,*fmuls.call,*fmulsu.call): New Insn. > * config/avr/t-avr (LIB1ASMFUNCS): Add _fmul, _fmuls, _fmulsu. > * config/avr/libgcc.S (__fmul): New function. > (__fmuls): New function. > (__fmulsu,__fmulsu_exit): New function. >
Approved. Denis.