summaryrefslogtreecommitdiffstats
path: root/crypto/sha
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-07-07 17:01:07 +0200
committerAndy Polyakov <appro@openssl.org>2014-07-07 17:02:00 +0200
commit0ad2a0a30354f34511498b727e4248eb3bb36ca1 (patch)
treed0b9df244b6f447200d0d1c062b545b4d407054c /crypto/sha
parent2cb761c1f4e0155743f4414932b5cff167389cf4 (diff)
sha[1|512]-x86_64.pl: fix logical errors with $shaext=0.
(cherry picked from commit 07b635cceb60abaddba2f0e469e5f5978258f46b)
Diffstat (limited to 'crypto/sha')
-rwxr-xr-xcrypto/sha/asm/sha1-x86_64.pl8
-rwxr-xr-xcrypto/sha/asm/sha512-x86_64.pl4
2 files changed, 11 insertions, 1 deletions
diff --git a/crypto/sha/asm/sha1-x86_64.pl b/crypto/sha/asm/sha1-x86_64.pl
index 7e0cdddaca..9bb6b49819 100755
--- a/crypto/sha/asm/sha1-x86_64.pl
+++ b/crypto/sha/asm/sha1-x86_64.pl
@@ -1835,7 +1835,9 @@ se_handler:
jmp .Lcommon_seh_tail
.size se_handler,.-se_handler
+___
+$code.=<<___ if ($shaext);
.type shaext_handler,\@abi-omnipotent
.align 16
shaext_handler:
@@ -1868,7 +1870,9 @@ shaext_handler:
jmp .Lcommon_seh_tail
.size shaext_handler,.-shaext_handler
+___
+$code.=<<___;
.type ssse3_handler,\@abi-omnipotent
.align 16
ssse3_handler:
@@ -1991,9 +1995,13 @@ $code.=<<___;
.LSEH_info_sha1_block_data_order:
.byte 9,0,0,0
.rva se_handler
+___
+$code.=<<___ if ($shaext);
.LSEH_info_sha1_block_data_order_shaext:
.byte 9,0,0,0
.rva shaext_handler
+___
+$code.=<<___;
.LSEH_info_sha1_block_data_order_ssse3:
.byte 9,0,0,0
.rva ssse3_handler
diff --git a/crypto/sha/asm/sha512-x86_64.pl b/crypto/sha/asm/sha512-x86_64.pl
index eef5f3f30c..476e99fee8 100755
--- a/crypto/sha/asm/sha512-x86_64.pl
+++ b/crypto/sha/asm/sha512-x86_64.pl
@@ -2339,10 +2339,12 @@ $code.=<<___;
.rva se_handler
.rva .Lprologue,.Lepilogue # HandlerData[]
___
-$code.=<<___ if ($SZ==4);
+$code.=<<___ if ($SZ==4 && $shaext);
.LSEH_info_${func}_shaext:
.byte 9,0,0,0
.rva shaext_handler
+___
+$code.=<<___ if ($SZ==4);
.LSEH_info_${func}_ssse3:
.byte 9,0,0,0
.rva se_handler