summaryrefslogtreecommitdiffstats
path: root/crypto/modes
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-03-08 09:46:19 +0100
committerAndy Polyakov <appro@openssl.org>2016-03-08 15:51:06 +0100
commiteb77e8886df84526f42f566632be71d4ed373308 (patch)
tree1b00377caae997512838c8e532e7a6c662847162 /crypto/modes
parentb76998b86c3f63bea7f8b85c8b62fda91fb8f4b7 (diff)
SPARCv9 assembly pack: unify build rules and argument handling.
Make all scripts produce .S, make interpretation of $(CFLAGS) pre-processor's responsibility, start accepting $(PERLASM_SCHEME). [$(PERLASM_SCHEME) is redundant in this case, because there are no deviataions between Solaris and Linux assemblers. This is purely to unify .pl->.S handling across all targets.] Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/modes')
-rw-r--r--crypto/modes/Makefile.in4
-rw-r--r--crypto/modes/asm/ghash-sparcv9.pl21
-rw-r--r--crypto/modes/build.info4
3 files changed, 15 insertions, 14 deletions
diff --git a/crypto/modes/Makefile.in b/crypto/modes/Makefile.in
index 5e4415c431..a62486ed13 100644
--- a/crypto/modes/Makefile.in
+++ b/crypto/modes/Makefile.in
@@ -48,8 +48,8 @@ ghash-x86_64.s: asm/ghash-x86_64.pl
$(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
aesni-gcm-x86_64.s: asm/aesni-gcm-x86_64.pl
$(PERL) asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) > $@
-ghash-sparcv9.s: asm/ghash-sparcv9.pl
- $(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS)
+ghash-sparcv9.S: asm/ghash-sparcv9.pl
+ $(PERL) asm/ghash-sparcv9.pl $(PERLASM_SCHEME) $@
ghash-alpha.s: asm/ghash-alpha.pl
(preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
$(PERL) asm/ghash-alpha.pl > $$preproc && \
diff --git a/crypto/modes/asm/ghash-sparcv9.pl b/crypto/modes/asm/ghash-sparcv9.pl
index e928c42cd7..badfcf7b09 100644
--- a/crypto/modes/asm/ghash-sparcv9.pl
+++ b/crypto/modes/asm/ghash-sparcv9.pl
@@ -46,14 +46,12 @@
# saturates at ~15.5x single-process result on 8-core processor,
# or ~20.5GBps per 2.85GHz socket.
-$bits=32;
-for (@ARGV) { $bits=64 if (/\-m64/ || /\-xarch\=v9/); }
-if ($bits==64) { $bias=2047; $frame=192; }
-else { $bias=0; $frame=112; }
-
-$output=shift;
+$output=pop;
open STDOUT,">$output";
+$frame="STACK_FRAME";
+$bias="STACK_BIAS";
+
$Zhi="%o0"; # 64-bit values
$Zlo="%o1";
$Thi="%o2";
@@ -75,11 +73,14 @@ $Htbl="%i1";
$inp="%i2";
$len="%i3";
-$code.=<<___ if ($bits==64);
+$code.=<<___;
+#include "sparc_arch.h"
+
+#ifdef __arch64__
.register %g2,#scratch
.register %g3,#scratch
-___
-$code.=<<___;
+#endif
+
.section ".text",#alloc,#execinstr
.align 64
@@ -183,7 +184,7 @@ gcm_ghash_4bit:
add $inp,16,$inp
cmp $inp,$len
- be,pn `$bits==64?"%xcc":"%icc"`,.Ldone
+ be,pn SIZE_T_CC,.Ldone
and $Zlo,0xf,$remi
ldx [$Htblo+$nhi],$Tlo
diff --git a/crypto/modes/build.info b/crypto/modes/build.info
index 220cdaf18d..dfce733cd3 100644
--- a/crypto/modes/build.info
+++ b/crypto/modes/build.info
@@ -13,8 +13,8 @@ BEGINRAW[Makefile]
CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
{- $builddir -}/aesni-gcm-x86_64.s: {- $sourcedir -}/asm/aesni-gcm-x86_64.pl
CC="$(CC)" $(PERL) {- $sourcedir -}/asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/ghash-sparcv9.s: {- $sourcedir -}/asm/ghash-sparcv9.pl
- CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-sparcv9.pl $@ $(CFLAGS)
+{- $builddir -}/ghash-sparcv9.S: {- $sourcedir -}/asm/ghash-sparcv9.pl
+ CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-sparcv9.pl $(PERLASM_SCHEME) $@
{- $builddir -}/ghash-alpha.s: {- $sourcedir -}/asm/ghash-alpha.pl
(preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-alpha.pl > $$preproc && \