[PATCH] T3/T4 sparc shifts, plus more timings
Torbjorn Granlund
tg at gmplib.org
Sat Mar 30 04:20:24 CET 2013
David Miller <davem at davemloft.net> writes:
From: David Miller <davem at davemloft.net>
Date: Fri, 29 Mar 2013 22:14:05 -0400 (EDT)
> Great. Let's sort out the strange hang behavior I get with your code.
>
> I think it's rshift. I actually happened to be working on rshift when
> you sent your combined code, and I also get strange hangs with my
> rshift too.
For reference here is the rshift.asm I was using.
Put this at the end of your code, to make it work:
L(end34):
srlx u0, cnt, %l2
or %l3, %l4, r0
sllx u1, tcnt, %l5
stx r0, [n + r0_off] C WAS: rp + 0
or %l2, %l5, r1
sub n, -(2 * 8), %o5
srlx u1, cnt, %l3
stx r1, [%o5 + r1_off] C WAS: rp + 8
L(end12):
add n, r0_off, rp
andcc n, 8, %g0
bz,pn %xcc, L(done)
nop
add rp, 8, rp
ldx [n + u0_off], u1
sllx u1, tcnt, %l4
or %l3, %l4, r0
stx r0, [rp + 8]
srlx u1, cnt, %l3
L(done):
stx %l3, [rp + 16]
ret
restore retval, 0, %o0
EPILOGUE()
--
Torbjörn
More information about the gmp-devel
mailing list