[PATCH 2/2] Optimize 64-bit mpn_add_N and mpn_sub_N for sparc T3 and later.

David Miller davem at davemloft.net
Thu Mar 7 06:03:51 CET 2013


From: Torbjorn Granlund <tg at gmplib.org>
Date: Thu, 07 Mar 2013 00:51:24 +0100

> David Miller <davem at davemloft.net> writes:
> 
>   From: Torbjorn Granlund <tg at gmplib.org>
>   Date: Wed, 06 Mar 2013 12:36:34 +0100
>   
>   > I think all you T3/T4 changes are now in. Please check that I didn't
>   > mess something up.
>   > 
>   > Thanks for this contribution!
>   
>   Looks good, there is some trailing whitespace in the ChangeLog but
>   that's probably my fault:
>   
>   +
>    	* mpn/sparc32/ultrasparct1/mul_1.asm: Unroll main loop one time, add
>    	T2/T3/T4 timings.
>   -	* mpn/sparc32/ultrasparct1/addmul_1.asm: Likewise.	
>   +	* mpn/sparc32/ultrasparct1/addmul_1.asm: Likewise.
>    	* mpn/sparc32/ultrasparct1/submul_1.asm: Likewise.
>    
> I optimised submul_1.asm, and then edited both addmul_1 and submul_1 to
> use as similar operand order as possible.  Please test these using
> tests/devel/try, and please time this new submul_1.

The testsuite starts failing very early with these changes.

ERROR in test 0, an = 13, bn = 11
FFFF00000003FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF000000
3FFFFFFFFFFFFFFE000000000000000000000000000000000000000000000000000000000000000000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0000000000000000000000000000000000000
7FEFFE8D7C0FEFC08FEFFF8D3B8002007FEFF68D7B00000000000004420000000000000442000000000000044200000000002003E1EFFF00FFEFFE93BDBFF8008FEFFE8D7F8400007FDFFE8D7B0000007FEFFE8D768000007FEFFE8D760000007FCFFE8D75C00000BFAFFE8D73000000C1F0028D748000007FEFFE8D740000000000000000000000000000000000000000001FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFFFFC000000040000000000000000000000000000000000000000000
3FFFC0000000FFFE0001FFFFFFF8000000000000000000000000000000000000000000000000000000000000001FFFDFFFFF0080000000000007FFFFFFFFFC0003FFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF803FFFFFFFBFFFFFFE000000020000000010000000000000000000000000000000000000000000000000000000001FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFFFFC000000040000000000000000000000000000000000000000000

Both new files seem to have problems, as I had to revert both in
order to get the testsuite passing again.


More information about the gmp-devel mailing list