summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-10-19 21:49:20 +0000
committerAndy Polyakov <appro@openssl.org>2011-10-19 21:49:20 +0000
commit227a822ab628267b5fd1b168a0a0bd58482b35ef (patch)
tree92622ef7fd98cb8146ce6a0bf459a26b80b6b76b /crypto
parenta9cf0b81fae785f3917b62ea2039845b9504558f (diff)
vxworks-mips: unify and add assembler.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/aes/Makefile2
-rw-r--r--crypto/aes/asm/aes-mips.pl11
-rw-r--r--crypto/sha/Makefile6
-rw-r--r--crypto/sha/asm/sha1-mips.pl10
-rw-r--r--crypto/sha/asm/sha512-mips.pl12
5 files changed, 28 insertions, 13 deletions
diff --git a/crypto/aes/Makefile b/crypto/aes/Makefile
index 86e97f335e..8edd358bd3 100644
--- a/crypto/aes/Makefile
+++ b/crypto/aes/Makefile
@@ -75,7 +75,7 @@ aes-ppc.s: asm/aes-ppc.pl
aes-parisc.s: asm/aes-parisc.pl
$(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
-aes-mips.s: asm/aes-mips.pl
+aes-mips.S: asm/aes-mips.pl
$(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
# GNU make "catch all"
diff --git a/crypto/aes/asm/aes-mips.pl b/crypto/aes/asm/aes-mips.pl
index 8431f9fcfb..2ce6deffc8 100644
--- a/crypto/aes/asm/aes-mips.pl
+++ b/crypto/aes/asm/aes-mips.pl
@@ -70,9 +70,9 @@ $pf = ($flavour =~ /nubi/i) ? $t0 : $t2;
#
######################################################################
-for (@ARGV) { $big_endian=1 if (/\-DB_ENDIAN/);
- $big_endian=0 if (/\-DL_ENDIAN/);
- $output=$_ if (/^\w[\w\-]*\.\w+$/); }
+$big_endian=(`echo MIPSEL | $ENV{CC} -E -P -`=~/MIPSEL/)?1:0;
+
+for (@ARGV) { $output=$_ if (/^\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";
if (!defined($big_endian))
@@ -85,8 +85,13 @@ my ($MSB,$LSB)=(0,3); # automatically converted to little-endian
$code.=<<___;
.text
+#ifdef OPENSSL_FIPSCANISTER
+# include <openssl/fipssyms.h>
+#endif
+#if !defined(__vxworks) || defined(__pic__)
.option pic2
+#endif
.set noat
___
diff --git a/crypto/sha/Makefile b/crypto/sha/Makefile
index 561a0ade5f..b1582f2cff 100644
--- a/crypto/sha/Makefile
+++ b/crypto/sha/Makefile
@@ -78,9 +78,9 @@ sha1-parisc.s: asm/sha1-parisc.pl; $(PERL) asm/sha1-parisc.pl $(PERLASM_SCHEME)
sha256-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
-sha1-mips.s: asm/sha1-mips.pl; $(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@
-sha256-mips.s: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
-sha512-mips.s: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
+sha1-mips.S: asm/sha1-mips.pl; $(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@
+sha256-mips.S: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
+sha512-mips.S: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
# GNU make "catch all"
sha1-%.S: asm/sha1-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
diff --git a/crypto/sha/asm/sha1-mips.pl b/crypto/sha/asm/sha1-mips.pl
index a69dfbd8d2..0495d611b2 100644
--- a/crypto/sha/asm/sha1-mips.pl
+++ b/crypto/sha/asm/sha1-mips.pl
@@ -64,9 +64,9 @@ if ($flavour =~ /64|n32/i) {
#
######################################################################
-for (@ARGV) { $big_endian=1 if (/\-DB_ENDIAN/);
- $big_endian=0 if (/\-DL_ENDIAN/);
- $output=$_ if (/^\w[\w\-]*\.\w+$/); }
+$big_endian=(`echo MIPSEL | $ENV{CC} -E -P -`=~/MIPSEL/)?1:0;
+
+for (@ARGV) { $output=$_ if (/^\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";
if (!defined($big_endian))
@@ -237,6 +237,10 @@ $FRAMESIZE=16; # large enough to accomodate NUBI saved registers
$SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? 0xc0fff008 : 0xc0ff0000;
$code=<<___;
+ifdef OPENSSL_FIPSCANISTER
+# include <openssl/fipssyms.h>
+#endif
+
.text
.set noat
diff --git a/crypto/sha/asm/sha512-mips.pl b/crypto/sha/asm/sha512-mips.pl
index 988f6f4c6a..ba5b250890 100644
--- a/crypto/sha/asm/sha512-mips.pl
+++ b/crypto/sha/asm/sha512-mips.pl
@@ -68,9 +68,9 @@ $pf = ($flavour =~ /nubi/i) ? $t0 : $t2;
#
######################################################################
-for (@ARGV) { $big_endian=1 if (/\-DB_ENDIAN/);
- $big_endian=0 if (/\-DL_ENDIAN/);
- $output=$_ if (/^\w[\w\-]*\.\w+$/); }
+$big_endian=(`echo MIPSEL | $ENV{CC} -E -P -`=~/MIPSEL/)?1:0;
+
+for (@ARGV) { $output=$_ if (/^\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";
if (!defined($big_endian)) { $big_endian=(unpack('L',pack('N',1))==1); }
@@ -238,9 +238,15 @@ $FRAMESIZE=16*$SZ+16*$SZREG;
$SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? 0xc0fff008 : 0xc0ff0000;
$code.=<<___;
+#ifdef OPENSSL_FIPSCANISTER
+# include <openssl/fipssyms.h>
+#endif
+
.text
.set noat
+#if !defined(__vxworks) || defined(__pic__)
.option pic2
+#endif
.align 5
.globl sha${label}_block_data_order