Bug#724320: gmp: x32: sizeof(mp_limb_t)!=sizeof(void*) is not supported by GAP and PARI
marc.glisse at inria.fr
Sat Sep 28 09:03:53 CEST 2013
On Fri, 27 Sep 2013, Steve M. Robbins wrote:
> For readers of gmp-discuss and Daniel Schepler: this concerns a bug reported
> to Debian regarding GMP on the x32 architecture. In a nutshell: x32 selects a
> limb size of 8, which means it is larger than a pointer and some software
> (gap, pari) fail to build. The question is whether it makes sense to change
> the limb size to 4 on x32. I'd appreciate your thoughts.
> See full thread at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724320
the whole point of creating x32 was to benefit from the speed advantages
of amd64 without having a pointer size of 64 bits. Those speed advantages
include using more registers, but also using hardware 64 bit long long.
The speed difference between 32 and 64 bits is very large (a factor >2 for
multiplication IIRC, not even counting the fact that we have
super-optimized asm for amd64 and may not be spending so much time
tweaking the x86 asm for new platforms these days) so it doesn't make
sense to me to penalize x32 that way. The assumption that mp_limb_t and
void* have the same size is the same kind of problem that we had when
people assumed things about long and void*, and most of those got fixed
with time (though I know it was very painful to do so in some cases).
More information about the gmp-discuss