[Patch,AVR]: Tweak division

2011-11-03 Thread Georg-Johann Lay
This is a tweak for signed 16- and 32-bit division routines. The old code called subroutine __divmod{si|hi}4_neg1 and returned if T-flag is not set. This is costly. By shuffling the instructions the test can be moved up without increasing the code size but saving calls here and there. The speed

Re: [Patch,AVR]: Tweak division

2011-11-04 Thread Denis Chertykov
2011/11/3 Georg-Johann Lay : > This is a tweak for signed 16- and 32-bit division routines. > The old code called subroutine __divmod{si|hi}4_neg1 and returned if T-flag is > not set.  This is costly.  By shuffling the instructions the test can be moved > up without increasing the code size but sav