Some basic questions on the invert_limb code

Anil Singhar anil.singhar at linaro.org
Tue Nov 19 05:34:39 UTC 2013


Actually I could not find any arm64 version of invert_limb.asm in 5.1.3
release or any code specific to arm64. During compilation, on an arm64
simulator called foundation model from Arm, the code was using the generic
C implementation. So I assumed that gmp has not been ported to arm64 and
started this work. Actually I had asked this question before I started this
work but never got any confirmation. In case I have missed this completely,
or it has not been mainlined or something, could you please be kind enough
to let me know:

1. if gmp has been ported to aarch64 / arm64
2. if yes, may I know which version it is available and where can I get the
code from.

Thank you.

-Anil



On 19 November 2013 02:11, Torbjorn Granlund <tg at gmplib.org> wrote:

> I think we have already asked you to not cross-post to multiple lists.
> Please respect our rules, or do not post at all.
>
>   Some further elucidation on my previous query regarding invert_limb
>   implementation.
>
>   So essentially, I am trying to understand
>   (i) what procedure was adopted to develop the approximation table used in
>   the invert_limb function and what do the table entries represent..?
>   OR
>   (ii) in other words, what is the relation between the index and the table
>   entry..?
>
> That depends on which file you're looking at.
>
> Newer code (such as the arm64 invert_limb.asm) presumaby uses the method
> suggested in the paper "Improved division of Invarant Integers", i.e.,
> floor(0x7fd00/i) for index i.  The newer tables are computed at compile
> time.
>
> Older code uses various other variants, with poor documentation.
>
> --
> Torbjörn
>


More information about the gmp-discuss mailing list