[Patch,avr]: Speed up 64-bit shifts in libgcc
Georg-Johann Lay
avr@gjlay.de
Mon Mar 4 11:43:00 GMT 2013
This patch fixed the speed of 64-bit shifts and rotate.
These operations were implemented by bit-wise shifts and thus the speed is not
reasonable for such basic arithmetic.
The new implementation first shifts byte-wise and only the remaining mod 8 is
shifted bit-wise.
The new methods needs few more instructions, but 64-bit arithmetic needs much
code, anyway... But base arithmetic should operate reasonably fast and not
take 600 or mote ticks for a simple shift.
Ok for trunk?
Johann
* config/avr/lib1funcs.S (__ashrdi3, __lshrdi3, __ashldi3)
(__rotldi3): Shift bytewise if applicable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-shift.diff
Type: text/x-patch
Size: 3285 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130304/e50b6471/attachment.bin>
More information about the Gcc-patches
mailing list