summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-07-09 20:08:01 +0200
committerAndy Polyakov <appro@openssl.org>2014-07-09 22:46:13 +0200
commit371feee876dd8b58531cb6e50fe79262db8e4ed7 (patch)
tree770c8f77e4f2c81bc6bc56c41a07b6ed5296df80 /crypto/bn
parentf50f0c6aa31502ab596ad94757ea9be791c62cc8 (diff)
x86_64 assembly pack: improve masm support.
(cherry picked from commit 1b0fe79f3ee27ebd20510da3af9ec04c6ee0f800)
Diffstat (limited to 'crypto/bn')
-rwxr-xr-xcrypto/bn/asm/rsaz-x86_64.pl2
-rwxr-xr-xcrypto/bn/asm/x86_64-mont.pl6
-rwxr-xr-xcrypto/bn/asm/x86_64-mont5.pl2
3 files changed, 6 insertions, 4 deletions
diff --git a/crypto/bn/asm/rsaz-x86_64.pl b/crypto/bn/asm/rsaz-x86_64.pl
index cd651f7e78..3a4f0c59a5 100755
--- a/crypto/bn/asm/rsaz-x86_64.pl
+++ b/crypto/bn/asm/rsaz-x86_64.pl
@@ -110,7 +110,7 @@ if (!$addx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
`ml64 2>&1` =~ /Version ([0-9]+)\./) {
- $addx = ($1>=11);
+ $addx = ($1>=12);
}
if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9])\.([0-9]+)/) {
diff --git a/crypto/bn/asm/x86_64-mont.pl b/crypto/bn/asm/x86_64-mont.pl
index 38039286be..2989b58f25 100755
--- a/crypto/bn/asm/x86_64-mont.pl
+++ b/crypto/bn/asm/x86_64-mont.pl
@@ -65,7 +65,7 @@ if (!$addx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
`ml64 2>&1` =~ /Version ([0-9]+)\./) {
- $addx = ($1>=11);
+ $addx = ($1>=12);
}
# int bn_mul_mont(
@@ -742,9 +742,11 @@ my @A0=("%r10","%r11");
my @A1=("%r12","%r13");
my ($a0,$a1,$ai)=("%r14","%r15","%rbx");
+$code.=<<___ if ($addx);
+.extern bn_sqrx8x_internal # see x86_64-mont5 module
+___
$code.=<<___;
.extern bn_sqr8x_internal # see x86_64-mont5 module
-.extern bn_sqrx8x_internal # see x86_64-mont5 module
.type bn_sqr8x_mont,\@function,6
.align 32
diff --git a/crypto/bn/asm/x86_64-mont5.pl b/crypto/bn/asm/x86_64-mont5.pl
index c107df95f5..fa22c30b1f 100755
--- a/crypto/bn/asm/x86_64-mont5.pl
+++ b/crypto/bn/asm/x86_64-mont5.pl
@@ -50,7 +50,7 @@ if (!$addx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
`ml64 2>&1` =~ /Version ([0-9]+)\./) {
- $addx = ($1>=11);
+ $addx = ($1>=12);
}
# int bn_mul_mont_gather5(