summaryrefslogtreecommitdiffstats
path: root/crypto/aes
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/aes
parenta9cf0b81fae785f3917b62ea2039845b9504558f (diff)
vxworks-mips: unify and add assembler.
Diffstat (limited to 'crypto/aes')
-rw-r--r--crypto/aes/Makefile2
-rw-r--r--crypto/aes/asm/aes-mips.pl11
2 files changed, 9 insertions, 4 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
___