This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Path, AVR]: Implement __builtin_avr_fmul* if no hardware multiplier


2011/7/4 Georg-Johann Lay <avr@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]