[Patch, AVR]: Better 32=16*16 widening multiplication
Georg-Johann Lay
avr@gjlay.de
Tue Jun 28 11:28:00 GMT 2011
This implements "mulhisi3" and "umulhisi3" widening multiplication
insns if AVR_HAVE_MUL.
I chose the interface as r25:r22 = r19:r18 * r21:r20 which is ok
because only avr-gcc BE will call respective __* support functions in
libgcc.
Tested without regression and hand-tested assembler code.
Johann
* config/avr/t-avr (LIB1ASMFUNCS): Add _mulhisi3, _umulhisi3,
_xmulhisi3_exit.
* config/avr/libgcc.S (_xmulhisi3_exit): New Function.
(__mulhisi3): Optimize if have MUL*. Use XJMP instead of rjmp.
(__umulhisi3): Ditto.
* config/avr/avr.md (mulhisi3): New insn expender.
(umulhisi3): New insn expender.
(*mulhisi3_call): New insn.
(*umulhisi3_call): New insn.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mulhisi3.diff
Type: text/x-patch
Size: 4999 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110628/19e9ee82/attachment.bin>
More information about the Gcc-patches
mailing list