Please update addaddmul_1msb0.asm to support ABI in mingw64

Marco Bodrato bodrato at mail.dm.unipi.it
Tue Oct 5 08:12:25 UTC 2021


Il 2021-10-05 07:38 nisse at lysator.liu.se ha scritto:
> Some potential further improvements: It would likely be possible to 
> order the
> cases at the end as L(nul), L(one), L(two), and let the nul case fall
> through into the one case, reducing the size a bit. And a mulx version
> could likely eliminate a lot of the move instructions.

Well, I added one more move to order the cases as you suggest. The code 
gets a little bit shorter.

> I think its performance matters mainly for
> gcdext in the Lehmer size range. (It's also used by hgcd base case, but
> for sizes where that is used, I'd guess that it's a pretty small part 
> of
> the complete gcd computation).

I also renamed registers, so that a push/pop couple is needed only if 
the loop is used; this may save a couple of cycles when the size is 
small. Does this make sense?

I attach the possible new version.

Ĝis,
m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addaddmul_1msb0.asm
Type: text/x-m4
Size: 3085 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20211005/d23782de/attachment-0001.bin>


More information about the gmp-devel mailing list