[PATCH] T3/T4 sparc shifts, plus more timings

David Miller davem at davemloft.net
Sat Mar 30 03:11:46 CET 2013

From: David Miller <davem at davemloft.net>
Date: Fri, 29 Mar 2013 22:08:16 -0400 (EDT)

> From: Torbjorn Granlund <tg at gmplib.org>
> Date: Sat, 30 Mar 2013 02:46:09 +0100
>> David Miller <davem at davemloft.net> writes:
>>   So here is a working generic 64-bit sparc lshift.asm that seems
>>   to work well on all chips.
>>   I'm now going to iterate over lshiftc and rshift.
>> I whacked off some code at the end, and generalised the resulting code
>> to become a lorrshift.asm.  Some additional things should be
>> streamlined, see comments in the code.
> When I put this into my tree, things like "./try -s1-32 mpn_lshift"
> simply hang.

And I want to take this opportunity to mention that 'try' is very
non-useful at times for testing newly coded routines.

It seems to perform several unrelated mpn calculations during
initialization before it does the primary test of the routine in

If those initialization mpn calculations use the routine being tested,
we can never end up getting to the test itself if there's a bug in the
new code, resulting in either erratica behavion or a crash.

This is very hard to diagnose compared to if the actual test itself
failed and 'try' gave a useful diagnostic with the mpn "expected
vs. obtained" dump.

More information about the gmp-devel mailing list