Some secondary asm T3,T4,T5 functions

Torbjorn Granlund tg at gmplib.org
Tue Apr 2 04:30:32 CEST 2013


Plain, non-pipelined version of bdiv_dbm1c.asm, mod_1_4.asm, mode1o.asm,
dive_1.asm, invert_limb.asm.

I wrote this with help of gcc, having first told longlong.h about
umulxhi and addxc.  Then I hand-optimised the result to varying degree.
In no case did I software pipeline the loops, so these will rely on OoO
execution for good speed.

I believe this code is correct.  If you could provide T3 and T4 timing
numbers, that would be welcome.  Or if you would optimise the lot, that
would also be welcome.

The code uses lzcnt, which I hope is implemented in T3 and T4.  I added
it to the missing.m4 file, so that I could test the code on my old
sparcs.

More work is needed for loading table symbols.  I think most files do it
properly, but at least sparct34-invert_limb.asm just assumes that a
locally defined table is at a 32-bit address, and statically.

Feedback welcome.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparct34-bdiv_dbm1c.asm
Type: application/octet-stream
Size: 1550 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20130402/7d25f069/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparct34-mod_1_4.asm
Type: application/octet-stream
Size: 4594 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20130402/7d25f069/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparct34-mode1o.asm
Type: application/octet-stream
Size: 2222 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20130402/7d25f069/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparct34-dive_1.asm
Type: application/octet-stream
Size: 2972 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20130402/7d25f069/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparct34-invert_limb.asm
Type: application/octet-stream
Size: 3466 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20130402/7d25f069/attachment-0004.obj>
-------------- next part --------------

-- 
Torbj?rn


More information about the gmp-devel mailing list