gmp 4.3.0 tests fail on Mac OS X 10.5

Jack Howarth howarth at bromo.med.uc.edu
Thu May 7 00:36:22 CEST 2009


On Wed, May 06, 2009 at 12:08:01PM -0700, Marcus Calhoun-Lopez wrote:
> For me, all tests passed once I applied the patch to gmp-4.3.0-20090505.
>
> -Marcus
>
> Torbjorn Granlund writes:
>
>> Either the hardware is wrong, or *both* the assembler and disassembler
>> are broken and get the offset wrong.  I don't know if there is a  
>> better
>> disassembler available; otool makes it difficult to check if the  
>> offset
>> is wrong (which I strongly suspect).
>>
>> I got a crazy idea: Perhaps the .Lfoo labels confuses Apple's  
>> programs.
>> (We really should use L(foo) in the GMP assembly, to make the labels
>> more short-lived.)
>>
>> Please try this patch:
>>
>> diff -r bcf4178f4ccc mpn/x86/p6/aors_n.asm
>> --- a/mpn/x86/p6/aors_n.asm	Wed May 06 14:13:24 2009 +0200
>> +++ b/mpn/x86/p6/aors_n.asm	Wed May 06 18:44:18 2009 +0200
>> @@ -90,7 +90,7 @@
>>  	ret_internal
>>  ')
>>
>> -.Lend:
>> +L(end):
>>  	sbb	%eax, %eax
>>  	neg	%eax
>>  	pop	%ebx
>> @@ -99,8 +99,8 @@
>>  	ret
>>
>>  	ALIGN(16)
>> -.Loop:
>> -	jecxz	.Lend
>> +L(top):
>> +	jecxz	L(end)
>>  L(ent):
>>  Zdisp(	mov,	0,(up,n,4), %eax)
>>  Zdisp(	ADCSBB,	0,(vp,n,4), %eax)
>> @@ -135,7 +135,7 @@
>>  	mov	%edx, 28(rp,n,4)
>>
>>  	lea	8(n), n
>> -	jmp	.Loop
>> +	jmp	L(top)
>>
>>  EPILOGUE()
>>
>>
>> -- 
>> Torbjörn
>
> _______________________________________________
> gmp-bugs mailing list
> gmp-bugs at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-bugs

Marcus,
   Can you try a mecurial pull from...

hg clone http://gmplib.org:8000/gmp-4.3 gmp-4.3.0

I am finding that the proposed changes are present now
but that the build on MacOS X 10.5.6 fails with...

 gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_mul_n -fexceptions -I/sw/include -m32 -O2 -pedantic -fomit-frame-pointer -mtune=k8 -march=k8 -c mul_n.c -o mul_n.o >/dev/null 2>&1
/bin/sh ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo mul_basecase | sed 's/_$//'`  -fexceptions -I/sw/include  -m32 -O2 -pedantic -fomit-frame-pointer -mtune=k8 -march=k8  `test -f 'mul_basecase.asm' || echo './'`mul_basecase.asm
 ../mpn/m4-ccas --m4=m4 gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_mul_basecase -fexceptions -I/sw/include -m32 -O2 -pedantic -fomit-frame-pointer -mtune=k8 -march=k8 mul_basecase.asm  -fno-common -DPIC -o .libs/mul_basecase.o
m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_mul_basecase -DPIC mul_basecase.asm >tmp-mul_basecase.s
 gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_mul_basecase -fexceptions -I/sw/include -m32 -O2 -pedantic -fomit-frame-pointer -mtune=k8 -march=k8 tmp-mul_basecase.s -fno-common -DPIC -o .libs/mul_basecase.o
tmp-mul_basecase.s:154:Junk character 58 (:).
tmp-mul_basecase.s:154:Rest of line ignored. 1st junk character valued 32 ( ).
make[2]: *** [mul_basecase.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Do you see this problem?
                Jack


More information about the gmp-bugs mailing list