提交 f2188228 编写于 作者: A Andy Polyakov

chacha/asm/chacha-*.pl: fix typos in tail processing.

RT#4323
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 80757ad4
...@@ -440,9 +440,9 @@ $code.=<<___; ...@@ -440,9 +440,9 @@ $code.=<<___;
eorhs @x[4],@x[4],@t[0] eorhs @x[4],@x[4],@t[0]
eorhs @x[5],@x[5],@t[1] eorhs @x[5],@x[5],@t[1]
# ifdef __thumb2__ # ifdef __thumb2__
it hi it ne
# endif # endif
ldrhi @t[0],[sp,#4*(32+2)] @ re-load len ldrne @t[0],[sp,#4*(32+2)] @ re-load len
# ifdef __thumb2__ # ifdef __thumb2__
itt hs itt hs
# endif # endif
...@@ -584,9 +584,9 @@ ___ ...@@ -584,9 +584,9 @@ ___
} }
$code.=<<___; $code.=<<___;
# ifdef __thumb2__ # ifdef __thumb2__
it hi it ne
# endif # endif
ldrhi @t[0],[sp,#4*(32+2)] @ re-load len ldrne @t[0],[sp,#4*(32+2)] @ re-load len
# ifdef __thumb2__ # ifdef __thumb2__
it hs it hs
# endif # endif
...@@ -598,15 +598,15 @@ $code.=<<___; ...@@ -598,15 +598,15 @@ $code.=<<___;
.Ltail: .Ltail:
ldr r12,[sp,#4*(32+1)] @ load inp ldr r12,[sp,#4*(32+1)] @ load inp
add @t[2],sp,#4*(0) add @t[1],sp,#4*(0)
ldr r14,[sp,#4*(32+0)] @ load out ldr r14,[sp,#4*(32+0)] @ load out
.Loop_tail: .Loop_tail:
ldrb @t[0],[@t[2]],#1 @ read buffer on stack ldrb @t[2],[@t[1]],#1 @ read buffer on stack
ldrb @t[1],[r12],#1 @ read input ldrb @t[3],[r12],#1 @ read input
subs @t[3],@t[3],#1 subs @t[0],@t[0],#1
eor @t[0],@t[0],@t[1] eor @t[3],@t[3],@t[2]
strb @t[0],[r14],#1 @ store output strb @t[3],[r14],#1 @ store output
bne .Loop_tail bne .Loop_tail
.Ldone: .Ldone:
...@@ -1120,7 +1120,7 @@ $code.=<<___; ...@@ -1120,7 +1120,7 @@ $code.=<<___;
# endif # endif
stmia @t[0],{@x[0]-@x[7]} stmia @t[0],{@x[0]-@x[7]}
add @t[2],sp,#4*(0) add @t[2],sp,#4*(0)
sub @t[3],@t[0],#64*3 @ len-=64*3 sub @t[3],@t[3],#64*3 @ len-=64*3
.Loop_tail_neon: .Loop_tail_neon:
ldrb @t[0],[@t[2]],#1 @ read buffer on stack ldrb @t[0],[@t[2]],#1 @ read buffer on stack
......
...@@ -257,11 +257,11 @@ $code.=<<___; ...@@ -257,11 +257,11 @@ $code.=<<___;
st @x[1],4*9(@t[0]) st @x[1],4*9(@t[0])
x @x[3],4*11(%r14) x @x[3],4*11(%r14)
st @x[2],4*10(@t[0]) st @x[2],4*10(@t[0])
la %r14,64(%r14)
st @x[3],4*11(@t[0]) st @x[3],4*11(@t[0])
cl${g}r %r14,@t[1] # done yet? cl${g}r %r14,@t[1] # done yet?
jle .Loop_outer la %r14,64(%r14)
jl .Loop_outer
.Ldone: .Ldone:
xgr %r0,%r0 xgr %r0,%r0
...@@ -291,7 +291,7 @@ $code.=<<___; ...@@ -291,7 +291,7 @@ $code.=<<___;
lrvr @x[1],@x[1] lrvr @x[1],@x[1]
lrvr @x[2],@x[2] lrvr @x[2],@x[2]
lrvr @x[3],@x[3] lrvr @x[3],@x[3]
stm @x[0],@x[3],$stdframe+4*8+4*8($sp) stm @x[0],@x[3],$stdframe+4*8($sp)
.Loop_tail: .Loop_tail:
llgc @x[4],0(@x[6],%r14) llgc @x[4],0(@x[6],%r14)
......
...@@ -1544,13 +1544,13 @@ $code.=<<___; ...@@ -1544,13 +1544,13 @@ $code.=<<___;
je .Ldone4xop je .Ldone4xop
lea 0x40($inp),$inp # inp+=64*3 lea 0x40($inp),$inp # inp+=64*3
vmovdqa $xa2,0x00(%rsp) vmovdqa $xa3,0x00(%rsp)
xor %r10,%r10 xor %r10,%r10
vmovdqa $xb2,0x10(%rsp) vmovdqa $xb3,0x10(%rsp)
lea 0x40($out),$out # out+=64*3 lea 0x40($out),$out # out+=64*3
vmovdqa $xc2,0x20(%rsp) vmovdqa $xc3,0x20(%rsp)
sub \$192,$len # len-=64*3 sub \$192,$len # len-=64*3
vmovdqa $xd2,0x30(%rsp) vmovdqa $xd3,0x30(%rsp)
.Loop_tail4xop: .Loop_tail4xop:
movzb ($inp,%r10),%eax movzb ($inp,%r10),%eax
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册