gmp 4.3.0 asm errors on ppc64
Jørn Amundsen
Jorn.Amundsen at ntnu.no
Sun Apr 19 19:30:12 CEST 2009
The divrem_1.asm and divrem_2.asm files do not compile on ppc64. The
CALL (mpn_invert_limb) statements seems to miss an accompanying EXTERN
declaration. However, the m4 EXTERN macro seems to work with LEA only,
and not with the CALL macros. To work around this, I had to declare an
EXTERN_TEXT macro, to be used with the divrem asm CALL statements.
I attach my patches applied when building rpms for AIX 5.3 with the
IBM xlc compiler. The patches
mpn/powerpc64/aix.m4
mpn/powerpc64/mode64/divrem_1.asm
mpn/powerpc64/mode64/divrem_2.asm
were applied to work around this problem. The remaining patches deals
with packaging issues.
Also enclosed to this email is a driver script and results from
running the pi-test on http://gmplib.org/pi-with-gmp.html.
I would like to stress that with the above patches, gmp 4.3.0 compiles
cleanly and pass the test suite (make check) both in 32- and 64-bit
mode on Power (using xlc 10.1.0.0).
Best Regards --Jørn Amundsen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-4.3.0-aix.patch
Type: text/x-diff
Size: 14799 bytes
Desc:
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20090419/d7ecb5f4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-pitest.sh
Type: application/x-sh
Size: 452 bytes
Desc:
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20090419/d7ecb5f4/attachment.sh>
-------------- next part --------------
*** system info ***
AIX node1 3 5 00CF100C4C00 powerpc unknown AIX
5.3.0.0
frequency 1900098000 Processor Speed False
smt_enabled false Processor SMT enabled False
smt_threads 2 Processor SMT threads False
state enable Processor state False
type PowerPC_POWER5 Processor type False
*** gmp info ***
gmp-4.3.0-1
gmp-devel-4.3.0-1
*** gmp pi bench ***
100000 digits:
#terms=7051, depth=14
sieve time = 0.000
..................................................
bs time = 0.069
gcd time = 0.000
div time = 0.010
sqrt time = 0.010
mul time = 0.010
total time = 0.099
P size=145244 digits (1.452440)
Q size=145237 digits (1.452370)
1000000 digits:
#terms=70513, depth=18
sieve time = 0.003
..................................................
bs time = 1.358
gcd time = 0.000
div time = 0.210
sqrt time = 0.120
mul time = 0.070
total time = 1.761
P size=1455608 digits (1.455608)
Q size=1455601 digits (1.455601)
10000000 digits:
#terms=705136, depth=21
sieve time = 0.158
...................................................
bs time = 24.420
gcd time = 0.000
div time = 2.808
sqrt time = 1.589
mul time = 1.059
total time = 30.044
P size=14561191 digits (1.456119)
Q size=14561184 digits (1.456118)
100000000 digits:
#terms=7051366, depth=24
sieve time = 2.274
..................................................
bs time = 441.520
gcd time = 0.000
div time = 33.585
sqrt time = 19.036
mul time = 12.281
total time = 508.796
P size=145605885 digits (1.456059)
Q size=145605879 digits (1.456059)
1000000000 digits:
#terms=70513669, depth=28
sieve time = 28.630
..................................................
bs time = 7570.518
gcd time = 0.000
div time = 407.759
sqrt time = 232.218
mul time = 165.526
total time = 8405.920
P size=1456065214 digits (1.456065)
Q size=1456065207 digits (1.456065)
More information about the gmp-bugs
mailing list