PA-RISC assembler pack: switch to bve in 64-bit builds.
authorAndy Polyakov <appro@openssl.org>
Tue, 18 Jun 2013 08:37:00 +0000 (10:37 +0200)
committerAndy Polyakov <appro@openssl.org>
Tue, 18 Jun 2013 08:37:00 +0000 (10:37 +0200)
PR: 3074

crypto/aes/asm/aes-parisc.pl
crypto/bn/asm/parisc-mont.pl
crypto/modes/asm/ghash-parisc.pl
crypto/pariscid.pl
crypto/rc4/asm/rc4-parisc.pl
crypto/sha/asm/sha1-parisc.pl
crypto/sha/asm/sha512-parisc.pl

index c36b6a22705cfa67fcd9f3b8e81e390a85bc2dda..714dcfbbe3b72ff3b629fc60083d37e9314ab664 100644 (file)
@@ -1015,7 +1015,8 @@ foreach (split("\n",$code)) {
                $SIZE_T==4 ? sprintf("extru%s,%d,8,",$1,31-$2)
                :            sprintf("extrd,u%s,%d,8,",$1,63-$2)/e;
 
-       s/,\*/,/ if ($SIZE_T==4);
+       s/,\*/,/                        if ($SIZE_T==4);
+       s/\bbv\b(.*\(%r2\))/bve$1/      if ($SIZE_T==8);
        print $_,"\n";
 }
 close STDOUT;
index 4a766a87fb2e225113843d8f265e93366c7864e1..c02ef6f014668324649265efc84709312158ad3f 100644 (file)
@@ -40,7 +40,7 @@
 # of arithmetic operations, most notably multiplications. It requires
 # more memory references, most notably to tp[num], but this doesn't
 # seem to exhaust memory port capacity. And indeed, dedicated PA-RISC
-# 2.0 code path, provides virtually same performance as pa-risc2[W].s:
+# 2.0 code path provides virtually same performance as pa-risc2[W].s:
 # it's ~10% better for shortest key length and ~10% worse for longest
 # one.
 #
@@ -988,6 +988,8 @@ foreach (split("\n",$code)) {
        # assemble 2.0 instructions in 32-bit mode...
        s/^\s+([a-z]+)([\S]*)\s+([\S]*)/&assemble($1,$2,$3)/e if ($BN_SZ==4);
 
+       s/\bbv\b/bve/gm if ($SIZE_T==8);
+
        print $_,"\n";
 }
 close STDOUT;
index 8c7454ee93407c615dc6be6931007b77e0308080..d5ad96b4033564b74ec8965b93ce68afaac87f5d 100644 (file)
@@ -724,6 +724,7 @@ foreach (split("\n",$code)) {
                s/cmpb,\*/comb,/;
                s/,\*/,/;
        }
+       s/\bbv\b/bve/   if ($SIZE_T==8);
        print $_,"\n";
 }
 
index 477ec9b87dd7d36ccb190001ec5bd4d00d9d6b26..bfc56fdc7fc04be2f8f92f64a5d7e8645e18a9ce 100644 (file)
@@ -97,33 +97,33 @@ OPENSSL_cleanse
        .PROC
        .CALLINFO       NO_CALLS
        .ENTRY
-       cmpib,*=        0,$len,Ldone
+       cmpib,*=        0,$len,L\$done
        nop
-       cmpib,*>>=      15,$len,Little
+       cmpib,*>>=      15,$len,L\$ittle
        ldi             $SIZE_T-1,%r1
 
-Lalign
+L\$align
        and,*<>         $inp,%r1,%r28
-       b,n             Laligned
+       b,n             L\$aligned
        stb             %r0,0($inp)
        ldo             -1($len),$len
-       b               Lalign
+       b               L\$align
        ldo             1($inp),$inp
 
-Laligned
+L\$aligned
        andcm           $len,%r1,%r28
-Lot
+L\$ot
        $ST             %r0,0($inp)
-       addib,*<>       -$SIZE_T,%r28,Lot
+       addib,*<>       -$SIZE_T,%r28,L\$ot
        ldo             $SIZE_T($inp),$inp
 
        and,*<>         $len,%r1,$len
-       b,n             Ldone
-Little
+       b,n             L\$done
+L\$ittle
        stb             %r0,0($inp)
-       addib,*<>       -1,$len,Little
+       addib,*<>       -1,$len,L\$ittle
        ldo             1($inp),$inp
-Ldone
+L\$done
        bv              ($rp)
        .EXIT
        nop
@@ -151,7 +151,7 @@ OPENSSL_instrument_bus
        ldw             0($out),$tick
        add             $diff,$tick,$tick
        stw             $tick,0($out)
-Loop
+L\$oop
        mfctl           %cr16,$tick
        sub             $tick,$lasttick,$diff
        copy            $tick,$lasttick
@@ -161,7 +161,7 @@ Loop
        add             $diff,$tick,$tick
        stw             $tick,0($out)
 
-       addib,<>        -1,$cnt,Loop
+       addib,<>        -1,$cnt,L\$oop
        addi            4,$out,$out
 
        bv              ($rp)
@@ -190,14 +190,14 @@ OPENSSL_instrument_bus2
        mfctl           %cr16,$tick
        sub             $tick,$lasttick,$diff
        copy            $tick,$lasttick
-Loop2
+L\$oop2
        copy            $diff,$lastdiff
        fdc             0($out)
        ldw             0($out),$tick
        add             $diff,$tick,$tick
        stw             $tick,0($out)
 
-       addib,=         -1,$max,Ldone2
+       addib,=         -1,$max,L\$done2
        nop
 
        mfctl           %cr16,$tick
@@ -208,17 +208,18 @@ Loop2
 
        ldi             1,%r1
        xor             %r1,$tick,$tick
-       addb,<>         $tick,$cnt,Loop2
+       addb,<>         $tick,$cnt,L\$oop2
        shladd,l        $tick,2,$out,$out
-Ldone2
+L\$done2
        bv              ($rp)
        .EXIT
        add             $rv,$cnt,$rv
        .PROCEND
 ___
 }
-$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
-$code =~ s/,\*/,/gm if ($SIZE_T==4);
+$code =~ s/cmpib,\*/comib,/gm  if ($SIZE_T==4);
+$code =~ s/,\*/,/gm            if ($SIZE_T==4);
+$code =~ s/\bbv\b/bve/gm       if ($SIZE_T==8);
 print $code;
 close STDOUT;
 
index 9e681965b96e509568ea887d7a147778b09533c4..bc366ecb60fb52efde24d9a3d05c61a024b3d4b1 100644 (file)
@@ -307,7 +307,8 @@ L\$opts
        .STRINGZ "RC4 for PA-RISC, CRYPTOGAMS by <appro\@openssl.org>"
 ___
 $code =~ s/\`([^\`]*)\`/eval $1/gem;
-$code =~ s/cmpib,\*/comib,/gm if ($SIZE_T==4);
+$code =~ s/cmpib,\*/comib,/gm  if ($SIZE_T==4);
+$code =~ s/\bbv\b/bve/gm       if ($SIZE_T==8);
 
 print $code;
 close STDOUT;
index 6d7bf495b20abbfb5b8e40021dae00349c600fac..6e5a328a6f1f377387863fabdb09e382eee5f9fe 100644 (file)
@@ -254,6 +254,7 @@ $code.=<<___;
 ___
 
 $code =~ s/\`([^\`]*)\`/eval $1/gem;
-$code =~ s/,\*/,/gm if ($SIZE_T==4);
+$code =~ s/,\*/,/gm            if ($SIZE_T==4);
+$code =~ s/\bbv\b/bve/gm       if ($SIZE_T==8);
 print $code;
 close STDOUT;
index e24ee58ae97f2a5c2bb78a93e1496462e1caaa28..fc0e15b3c0593a04c803b1284b7d885a91df9314 100755 (executable)
@@ -785,6 +785,8 @@ foreach (split("\n",$code)) {
 
        s/cmpb,\*/comb,/ if ($SIZE_T==4);
 
+       s/\bbv\b/bve/    if ($SIZE_T==8);
+
        print $_,"\n";
 }