Small operands gcd improvements

Torbjörn Granlund tg at gmplib.org
Thu Aug 8 12:23:29 UTC 2019


nisse at lysator.liu.se (Niels Möller) writes:

  Does any other gmp functions do that? If we

  1. Do that,

  2. Arrange that g0 is put in the "primary" return register

  3. Ensure that the register used for returning g1 isn't clobbered by
     gcd_11 assembly

Or arrange for it to naturally become zero...

  then most assembly implementations of gcd_22 could tail call, aka jump
  to, gcd_11. Which would be convenient if, e.g, we want a single
  x86_64/gcd_22.asm to jumping into the right x86_64/foo/gcd_11.asm
  depending on configuration.

Clever idea.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list