Niels Möller nisse at
Mon Oct 3 14:23:29 CEST 2011


I've merged David's mulmid implementation (based on the June 9 revision
in the shell:~dmharvey/projects/gmp/mulmid repository). As far as I
understood, the paper work is in order for that contribution?

I've had a quick look through the code, and I've spent a few hours
reviewing changes and writing reasonably detailed ChangeLog entries.
Some questions and (mostly minor) comments:

  * mpn_toom42_mulmid_itch: Should this be a macro, real function, or
    inline function? Currently it's a macro, but with a lower-case name
    like a function.
  * There's code in try.c (which I'm not very familiar with) to test the
    code, but it is not exercised by a regular make check.
  * In the testing code, the functions refmpn_toom42_mulmid and
    refmpn_mulmid are defined, as wrappers around
    refmpn_mulmid_basecase, but as far as I have seen, they're unused.

  * In try.c, there's one change related to the handling of
    SIZE_CEIL_HALF, which is not obviously related to the new mulmid
    code. I havn't tried to figure out if this is correct or what the
    problem was.

  * In the assembly files, I think the instruction

	shr	$1, %al		C restore carry

    can be replaced by

        shr	%al		C restore carry

    for a bit more compact object code.

  * I seem to remember that an earlier incarnation of the mulmid
    implementation used a mullo function which returned two limbs more
    than the current mullo. Is that obsolete now?

  * There's currently no code using mulmid. Did you have an
    implementation of invert.c or binvert.c using mulmid? If so, what's
    the status?


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list