[PATCH 2/2] Optimize 64-bit mpn_add_N and mpn_sub_N for sparc T3 and later.

Torbjorn Granlund tg at gmplib.org
Thu Mar 7 14:22:39 CET 2013


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

  Torbjorn Granlund <tg at gmplib.org> writes:
  
  > I optimised submul_1.asm, and then edited both addmul_1 and submul_1 to
  > use as similar operand order as possible.
  
  So remaining differences are necessary?

Some differences need to remain, yes...

  I don't remember much sparc assembly, but it seems carry handling is
  done slightly differently. But appearantly there was no need for
  negation-on-the-fly tricks in submul_1, you just use subcc instead of
  addcc for the final subtraction (maybe we discussed that trick in some
  other context?).
  
There are no 64-bit subtraction instruction that take a useful carry-in.
More recently, as part of a special "visual instruction set 3", Oracle
added 64-bit addition instructions which take a useful carry-in...

-- 
Torbjörn


More information about the gmp-devel mailing list