Some basic questions on the invert_limb code

Anil Singhar anil.singhar at linaro.org
Mon Nov 18 11:31:34 UTC 2013


Hi,

I have some basic questions on the mpn_invert_limb function implementation
which I am trying to understand.

1. What does the table "approx_tab" represent?
2. Why is the content of this table is different between the assembly
implementation under ARM (i.e. mpn/arm/invert_limb.asm) and the one written
in C under mpn/cray/ieee/invert_limb.c

Is there any place where this code and the algorithm is explained. I have
gone through the paper "Improve Division by Invariant Integers" already,
but still can't follow the code and how and why it is written this way. I
was hoping to understand the arm assembly implementation from the C
implementation but that didn't help.

Thanks for reading my mail.

Regards,
Anil


More information about the gmp-discuss mailing list