summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4/asm/rc4-586.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rc4/asm/rc4-586.pl')
-rw-r--r--src/lib/libcrypto/rc4/asm/rc4-586.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/rc4/asm/rc4-586.pl b/src/lib/libcrypto/rc4/asm/rc4-586.pl
index d6e98f0811..ef7eee766c 100644
--- a/src/lib/libcrypto/rc4/asm/rc4-586.pl
+++ b/src/lib/libcrypto/rc4/asm/rc4-586.pl
@@ -200,22 +200,23 @@ sub RC4
200 200
201 &lea ($ty,&DWP(0,$in,$ty)); 201 &lea ($ty,&DWP(0,$in,$ty));
202 &mov (&swtmp(2),$ty); 202 &mov (&swtmp(2),$ty);
203 &movz ($tx,&BP(0,$d,$x));
203 204
204 # strangely enough unrolled loop performs over 20% slower... 205 # strangely enough unrolled loop performs over 20% slower...
205 &set_label("RC4_CHAR_loop"); 206 &set_label("RC4_CHAR_loop");
206 &movz ($tx,&BP(0,$d,$x));
207 &add (&LB($y),&LB($tx)); 207 &add (&LB($y),&LB($tx));
208 &movz ($ty,&BP(0,$d,$y)); 208 &movz ($ty,&BP(0,$d,$y));
209 &movb (&BP(0,$d,$y),&LB($tx)); 209 &movb (&BP(0,$d,$y),&LB($tx));
210 &movb (&BP(0,$d,$x),&LB($ty)); 210 &movb (&BP(0,$d,$x),&LB($ty));
211 &add (&LB($ty),&LB($tx)); 211 &add (&LB($ty),&LB($tx));
212 &movz ($ty,&BP(0,$d,$ty)); 212 &movz ($ty,&BP(0,$d,$ty));
213 &add (&LB($x),1);
213 &xorb (&LB($ty),&BP(0,$in)); 214 &xorb (&LB($ty),&BP(0,$in));
214 &movb (&BP(0,$out),&LB($ty)); 215 &lea ($in,&DWP(1,$in));
215 &inc (&LB($x)); 216 &movz ($tx,&BP(0,$d,$x));
216 &inc ($in);
217 &inc ($out);
218 &cmp ($in,&swtmp(2)); 217 &cmp ($in,&swtmp(2));
218 &movb (&BP(0,$out),&LB($ty));
219 &lea ($out,&DWP(1,$out));
219 &jb (&label("RC4_CHAR_loop")); 220 &jb (&label("RC4_CHAR_loop"));
220 221
221 &set_label("finished"); 222 &set_label("finished");