mpz_gcd() returns different values on Linux and HP-UX
Prashanth PS
shanthps at india.hp.com
Mon Oct 13 21:42:44 CEST 2003
Hi Team,
I've been trying to install and work with GMP on HP-UX. If works
just fine on Linux with Gcc. However the conversion of assembly file
from invert_limb.asm to tmp-invert_limb.s and then to invert_limb.o does
not work (bcoz of .section .rodata ). So I compiled invert_limb.o
with "gcc" and the rest with HPUX' ansi C compiler.
I have a simple test program that behaves differently on a 32 bit
Linux and a 64 bit HPUX (din't try 32 bit HPUX though). I think there's
probably some thing going wrong in either the way it was built or in the
way it has been compiled. I have illustrated the scenario below,
On i386 / Linux,
num mp_size=1, mp_d=0
m mp_size= 1, mp_d=1
mpz_gcd(g,m,num);
g=mp_alloc=1, mp_size= 1, mp_d=1
On ia64 / HPUX
num=mp_size=1, mp_d=0
m mp_size= 1, mp_d=1
mpz_gcd(g,m,num);
g=mp_alloc=1, mp_size= 1, mp_d=2
I am just wondering of how this could happen, can you please comment on
this....
Best Regards,
Prashanth
More information about the gmp-discuss
mailing list