From 52f7e44ec88a4d803dc9783cd7c71f87014ae3ee Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 7 Jul 2021 17:47:06 +0200 Subject: Split bignum code out of the sparcv9cap.c Fixes #15978 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/16019) --- crypto/bn/asm/sparct4-mont.pl | 5 ++++- crypto/bn/asm/sparcv9-gf2m.pl | 5 ++++- crypto/bn/asm/sparcv9-mont.pl | 5 ++++- crypto/bn/asm/sparcv9a-mont.pl | 5 ++++- crypto/bn/asm/vis3-mont.pl | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) (limited to 'crypto/bn/asm') 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 +#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 -- cgit v1.2.3