提交 8e9f1bb9 编写于 作者: A Andy Polyakov

chacha/asm/chacha-x86.pl: make it compile on legacy systems.

Usage of $ymm variable is a bit misleading here, it doesn't refer
to %ymm register bank, but rather to VEX instruction encoding,
which AMD XOP code path depends on.
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 24c2cd39
......@@ -437,8 +437,10 @@ my ($ap,$bp,$cp,$dp)=map(($_&~3)+(($_-1)&3),($ai,$bi,$ci,$di)); # previous
&function_begin("ChaCha20_ssse3");
&set_label("ssse3_shortcut");
if ($ymm) {
&test (&DWP(4,"ebp"),1<<11); # test XOP bit
&jnz (&label("xop_shortcut"));
}
&mov ($out,&wparam(0));
&mov ($inp,&wparam(1));
......@@ -770,7 +772,7 @@ sub SSSE3ROUND { # critical path is 20 "SIMD ticks" per round
}
&asciz ("ChaCha20 for x86, CRYPTOGAMS by <appro\@openssl.org>");
if ($xmm) {
if ($ymm) {
my ($xa,$xa_,$xb,$xb_,$xc,$xc_,$xd,$xd_)=map("xmm$_",(0..7));
my ($out,$inp,$len)=("edi","esi","ecx");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册