This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,avr]: ad PR54222: Add saturated multiply
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Tue, 12 Feb 2013 13:49:56 +0400
- Subject: Re: [Patch,avr]: ad PR54222: Add saturated multiply
- References: <5119470C.2050501@gjlay.de>
2013/2/11 Georg-Johann Lay <avr@gjlay.de>:
> This patch adds optimized support for (short) (un)signed _Sat _Accum
> multiplication (HA, UHA, SA, USA).
>
> The 32-bit multiply uses 64 = 32 * 32 widening multiplication. As a spin-off,
> the widening mul is available as [u]mulsidi3 default pattern.
>
>
> Okay for trunk?
>
> Johann
>
>
> gcc/
> PR target/54222
> * config/avr/avr-dimode.md (umulsidi3, mulsidi3): New expanders.
> (umulsidi3_insn, mulsidi3_insn): New insns.
>
> libgcc/
> PR target/54222
> * config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add: _usmulUHA, _usmulUSA,
> _ssmulHA, _ssmulSA.
> (LIB1ASMFUNCS): Add: _muldi3_6, _mulsidi3, _umulsidi3, _usmuluha3,
> _ssmulha3, _usmulusa3, _ssmulsa3.
> * config/avr/lib1funcs.S (__muldi3_6): Break out of __muldi3.
> (__muldi3): XCALL __muldi3_6 instead of rcall.
> (__umulsidi3, __mulsidi3): New functions.
> (do_prologue_saves, do_epilogue_restores): New .macros.
> (__divdi3_moddi3): Use them.
> * config/avr/lib1funcs-fixed.S (__usmuluha3, __ssmulha3)
> (__usmulusa3, __ssmulsa3): New functions.
>
Approved.
Denis.