bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function mpz_gcd() works differently on HPUX and Linux - ia64


From: Prashanth PS
Subject: Re: Function mpz_gcd() works differently on HPUX and Linux - ia64
Date: Wed, 15 Oct 2003 17:04:50 +0530
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Hi Kevin,

    Thank you very much for the quick reply.

    The tests/GMP libs seem to be working (pretty) fine now :-).  Changes to "invert_limb.asm" were the key changes. 

Kevin Ryde wrote:
Prashanth PS <address@hidden> writes:
  
    I would like to discuss and resolve two issues I stumble upon when
working with HPUX/ia64.
    

In future, it's much easier to deal with separate messages for
separate matters.
Yep, Sure.

  
i)    I've been trying to install ans work with GMP on HPUX (ansi C
Compiler) and Linux
    

It's surprising that you can install using only the kernel.  Perhaps
you mean the GNU/Linux system.
I tried two different configurations on an ia64 machine.

Linux/gcc or GNU ( no problems, works perfect)
HPUX/ansic C compiler (works fine now)


  
Though
installation and tests (including "make check") work fine with
gcc/Linux, t-constants fails during the first phase ("make check"),
with an error (5 out of 4 tests passed),

        PP_INVERTED == 21cfe6cfc938b36b, but pp_inverted_calc == 0
    

I think we had at least two problems in 4.1.2 with hpux ia64, firstly
that we only know lp64 mode in the asm code, but didn't force
CFLAGS=+DD64 in the build, and secondly that the data in that
invert_limb.asm was for little endian, whereas hpux runs in big endian
mode.  You might like to try forcing the CFLAGS if you haven't
already, and change the data to

.LC0:   data4 0x403f8000, 0x00000000, 0x00000000, 0x00000000    C 2^64
        data4 0x407f8000, 0x00000000, 0x00000000, 0x00000000    C 2^128

This will all be addressed properly in the next release.  Until then
unfortunately we can't really claim to work on hpux ia64, or only with
the generic C code (ie. cpu "none", which will be very slow).
Please do let me know if you are aware of any other HPUX/ia64 issues with GMP. The current version I have compiled on HPUX seems to be a little slow. Would there be any GMP fine tuning probabilities to get it working faster on an ia64 (any fine tuning tips) ? I have the maximum optimization set (O3) on HPUX.

  
The compilation works just fine on Linux with Gcc. However with
aCC/HPUX, 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 ).
    

Thanks, yep, that should be just ".rodata".

  
first, mp_size= 1, mp_d=1
sec, mp_size=1, mp_d=0
    

Hmm.  Something has gone wrong before this point, a value 0 should be
represented with size==0.
  
These problems seem to have been rectified with the changes to invert_limb.asm. So thanks again :-).

Best Regards,
Prashanth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]