mpn_gcdext_n_basecase (was: Re: GMP symbol naming (and the history thereof)?)

2013-03-03 Thread Niels Möller
Torbjorn Granlund writes: > > __gmpn_gcdext_lehmer_n > > I think this would make sense as public, under a different name, e.g., > mpn_gcdext_n_basecase. > > Maybe. We need to worry about the itch/scratch interface. For user > interface code, it seems to mak

mpn_cnd_add_n (was: Re: GMP symbol naming (and the history thereof)?)

2013-03-03 Thread Niels Möller
Torbjorn Granlund writes: > And this. (I think I'd prefer > > mp_limb_t > mpn_cnd_add_n (mp_limb_t cnd, mp_ptr rp, mp_srcptr ap, mp_srcptr bp, > mp_size_t n) > > but that's a minor detail, and view the cnd_-prefix as a family of > functions. Some other potential members are m

Public mpn_add_nc (was Re: GMP symbol naming (and the history thereof)?)

2013-03-03 Thread Niels Möller
Torbjorn Granlund writes: > ni...@lysator.liu.se (Niels Möller) writes: > > Here are some comments on a few that stood out. > > Thanks! I think I'll reply in one mail per function (-group). > I didn't list __gmpn_add_n_sub_n as public since I consider it > experimental. It seemed like a g

Re: GMP symbol naming (and the history thereof)?

2013-03-03 Thread Torbjorn Granlund
About gmp-func-list.txt. Note that this file was laid out for easy automated processing for the shared library overhead reduction project. ni...@lysator.liu.se (Niels Möller) writes: Here are some comments on a few that stood out. Thanks! > __gmpn_add_n_sub_n

Re: GMP symbol naming (and the history thereof)?

2013-03-03 Thread Niels Möller
Torbjorn Granlund writes: > As a start, I automatically made a list of symbols. Here are some comments on a few that stood out. > __gmpn_add_n_sub_n > __gmpn_add_nc I think these make sense as public (we'd need to investigate how

Re: GMP symbol naming (and the history thereof)?

2013-03-01 Thread Torbjorn Granlund
Richard Henderson writes: Excellent. That's more or less exactly what I want to do. That would be another welcome contribution! I believe that IFUNC and the "fallback" fat system can live side-by side, sharing most of the actual logic. The choice of which implementation to build int

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Richard Henderson
On 02/28/2013 12:50 AM, Torbjorn Granlund wrote: > Richard Henderson writes: > > Several times over the past week as I debug my neon routines, it has > become painfully apparent (as I accidentally single-step into the > dynamic linker) that the shared libgmp could use some help in > moder

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Richard Henderson
On 02/28/2013 03:14 AM, bodr...@mail.dm.unipi.it wrote: >> We could start there, and wait for the screams. :-) > > Our own test-suite will let the first scream out !-D Yes, I know. The solution that I like best is to do such unit testing statically, rather than disturbing symbols exported from

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Torbjorn Granlund
I try to classify things on my list a bit further, and correct errors. I stumbed over some functions. I need feedback here. mpn_div_qr_2 is decl but not doc. I suggest we move the declaration to gmp-impl.h. mpn_divrem_2 is decl but not doc. I suggest we move the declaration to gmp-impl.h. mpn_g

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Vincent Lefevre
On 2013-02-28 12:51:29 +0100, Niels Möller wrote: > Vincent Lefevre writes: > > > I don't understand why changing the __ prefix to a gmp_ or libgmp_ > > namespace would be a problem. > > It breaks ABI compatibility (but that's no big problem, since I think we > all agree the change should be don

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Niels Möller
Vincent Lefevre writes: > I don't understand why changing the __ prefix to a gmp_ or libgmp_ > namespace would be a problem. It breaks ABI compatibility (but that's no big problem, since I think we all agree the change should be done only when we have some other good reason to break the ABI). An

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Torbjorn Granlund
bodr...@mail.dm.unipi.it writes: Il Gio, 28 Febbraio 2013 9:50 am, Torbjorn Granlund ha scritto: > Richard Henderson writes: > We are at least aware of these things ("Calls and linkage"): > https://gmplib.org/devel/GMPng.html > But the first thing to do is to confirm exactly what A

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread bodrato
Ciao, Il Gio, 28 Febbraio 2013 9:50 am, Torbjorn Granlund ha scritto: > Richard Henderson writes: > We are at least aware of these things ("Calls and linkage"): > https://gmplib.org/devel/GMPng.html > But the first thing to do is to confirm exactly what API symbols > should be exported. I'm

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Vincent Lefevre
On 2013-02-28 10:43:20 +0100, Torbjorn Granlund wrote: > ni...@lysator.liu.se (Niels Möller) writes: > But I don't think using a __ prefix on symbols is appropriate, it would > be better to use the namespace gmp_* or maybe libgmp_*. > > I disagree. > > Any solution here is a compromise. An

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I think it make sense with some level of name mangling from API symbols to linker names. First, it's good practice to use a single prefix for all linker symbols, while it's nice to use multiple prefixes for API symbols (mpz_*, mpn_*, gmp_*, ...).

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Niels Möller
Torbjorn Granlund writes: > There are some specific GNU/Linux loader features which were > discusssed here not long ago. I prefer to start portable, then do > unportable tweaks. (Yes, the GNU system is the most important goal > for the GNU project, but I want GMP to be great on every reasonable

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread David Miller
From: Torbjorn Granlund Date: Thu, 28 Feb 2013 09:50:29 +0100 > One reason for this is that we put some mpn functions in libc. They > were there for many years, and last time I looked they where still > there. We don't ever want to replace libc's internal routines for > people that also link to

Re: GMP symbol naming (and the history thereof)?

2013-02-28 Thread Torbjorn Granlund
Richard Henderson writes: Several times over the past week as I debug my neon routines, it has become painfully apparent (as I accidentally single-step into the dynamic linker) that the shared libgmp could use some help in modernizing its internal linkage. We are at least aware of thes