summaryrefslogtreecommitdiffstats
path: root/crypto/bn/asm
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-07-07 17:47:06 +0200
committerTomas Mraz <tomas@openssl.org>2021-07-15 09:33:04 +0200
commit52f7e44ec88a4d803dc9783cd7c71f87014ae3ee (patch)
treeb49310dc3808ba0e9130e6c148ae85d3479a9856 /crypto/bn/asm
parent8e94c51b3279f7faae9161df5112414f915cd9f3 (diff)
Split bignum code out of the sparcv9cap.c
Fixes #15978 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16019)
Diffstat (limited to 'crypto/bn/asm')
-rwxr-xr-xcrypto/bn/asm/sparct4-mont.pl5
-rw-r--r--crypto/bn/asm/sparcv9-gf2m.pl5
-rw-r--r--crypto/bn/asm/sparcv9-mont.pl5
-rwxr-xr-xcrypto/bn/asm/sparcv9a-mont.pl5
-rw-r--r--crypto/bn/asm/vis3-mont.pl5
5 files changed, 20 insertions, 5 deletions
diff --git a/crypto/bn/asm/sparct4-mont.pl b/crypto/bn/asm/sparct4-mont.pl
index 2df872b4a8..6bc98530ce 100755
--- a/crypto/bn/asm/sparct4-mont.pl
+++ b/crypto/bn/asm/sparct4-mont.pl
@@ -86,7 +86,10 @@ require "sparcv9_modes.pl";
$output = pop and open STDOUT,">$output";
$code.=<<___;
-#include "sparc_arch.h"
+#ifndef __ASSEMBLER__
+# define __ASSEMBLER__ 1
+#endif
+#include "crypto/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/bn/asm/sparcv9-gf2m.pl b/crypto/bn/asm/sparcv9-gf2m.pl
index 41ab8039cc..28d1ed7426 100644
--- a/crypto/bn/asm/sparcv9-gf2m.pl
+++ b/crypto/bn/asm/sparcv9-gf2m.pl
@@ -38,7 +38,10 @@ $tab="%l0";
($lo,$hi,$b)=("%g1",$a8,"%o7"); $a=$lo;
$code.=<<___;
-#include <sparc_arch.h>
+#ifndef __ASSEMBLER__
+# define __ASSEMBLER__ 1
+#endif
+#include "crypto/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/bn/asm/sparcv9-mont.pl b/crypto/bn/asm/sparcv9-mont.pl
index 6005334790..ac93ef9ee6 100644
--- a/crypto/bn/asm/sparcv9-mont.pl
+++ b/crypto/bn/asm/sparcv9-mont.pl
@@ -83,7 +83,10 @@ $tpj="%l7";
$fname="bn_mul_mont_int";
$code=<<___;
-#include "sparc_arch.h"
+#ifndef __ASSEMBLER__
+# define __ASSEMBLER__ 1
+#endif
+#include "crypto/sparc_arch.h"
.section ".text",#alloc,#execinstr
diff --git a/crypto/bn/asm/sparcv9a-mont.pl b/crypto/bn/asm/sparcv9a-mont.pl
index 2a4255ed69..062a017072 100755
--- a/crypto/bn/asm/sparcv9a-mont.pl
+++ b/crypto/bn/asm/sparcv9a-mont.pl
@@ -126,7 +126,10 @@ $nhia="%f56"; $nhib="%f58"; $nhic="%f60"; $nhid="%f62";
$ASI_FL16_P=0xD2; # magic ASI value to engage 16-bit FP load
$code=<<___;
-#include "sparc_arch.h"
+#ifndef __ASSEMBLER__
+# define __ASSEMBLER__ 1
+#endif
+#include "crypto/sparc_arch.h"
.section ".text",#alloc,#execinstr
diff --git a/crypto/bn/asm/vis3-mont.pl b/crypto/bn/asm/vis3-mont.pl
index 6ee64e28f6..6649c34727 100644
--- a/crypto/bn/asm/vis3-mont.pl
+++ b/crypto/bn/asm/vis3-mont.pl
@@ -31,7 +31,10 @@ $frame = "STACK_FRAME";
$bias = "STACK_BIAS";
$code.=<<___;
-#include "sparc_arch.h"
+#ifndef __ASSEMBLER__
+# define __ASSEMBLER__ 1
+#endif
+#include "crypto/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch