GH601: Various spelling fixes.
[openssl.git] / crypto / perlasm / sparcv9_modes.pl
index a13ffcec2d1d870eb917c35386d3267266134490..74544fbe2c22c0536a6becc68f0153907860c97d 100644 (file)
@@ -35,6 +35,8 @@ $::code.=<<___;
 .align 32
 ${alg}${bits}_t4_cbc_encrypt:
        save            %sp, -$::frame, %sp
+       cmp             $len, 0
+       be,pn           $::size_t_cc, .L${bits}_cbc_enc_abort
        sub             $inp, $out, $blk_init   ! $inp!=$out
 ___
 $::code.=<<___ if (!$::evp);
@@ -123,6 +125,7 @@ $::code.=<<___ if (!$::evp);
        std             %f2, [$ivec + 8]
 ___
 $::code.=<<___;
+.L${bits}_cbc_enc_abort:
        ret
        restore
 
@@ -249,6 +252,8 @@ $::code.=<<___;
 .align 32
 ${alg}${bits}_t4_cbc_decrypt:
        save            %sp, -$::frame, %sp
+       cmp             $len, 0
+       be,pn           $::size_t_cc, .L${bits}_cbc_dec_abort
        sub             $inp, $out, $blk_init   ! $inp!=$out
 ___
 $::code.=<<___ if (!$::evp);
@@ -341,6 +346,7 @@ $::code.=<<___ if (!$::evp);
        std             %f14, [$ivec + 8]
 ___
 $::code.=<<___;
+.L${bits}_cbc_dec_abort:
        ret
        restore
 
@@ -1243,6 +1249,7 @@ $code.=<<___;
        fxor            %f8,  %f4, %f4
        fxor            %f10, %f6, %f6
 
+       subcc           $len, 2, $len
        stda            %f0, [$out]0xe2         ! ASI_BLK_INIT, T4-specific
        add             $out, 8, $out
        stda            %f2, [$out]0xe2         ! ASI_BLK_INIT, T4-specific
@@ -1376,7 +1383,7 @@ ___
 
 # Purpose of these subroutines is to explicitly encode VIS instructions,
 # so that one can compile the module without having to specify VIS
-# extentions on compiler command line, e.g. -xarch=v9 vs. -xarch=v9a.
+# extensions on compiler command line, e.g. -xarch=v9 vs. -xarch=v9a.
 # Idea is to reserve for option to produce "universal" binary and let
 # programmer detect if current CPU is VIS capable at run-time.
 sub unvis {
@@ -1657,8 +1664,8 @@ sub emit_assembler {
        s/\b(camellia_[^s]+)\s+(%f[0-9]{1,2}),\s*(%f[0-9]{1,2}),\s*(%f[0-9]{1,2})/
                &uncamellia3($1,$2,$3,$4)
         /geo or
-       s/\b(des_\w+)\s+(?<rs1>%f[0-9]{1,2}),\s*(?<rs2>[%fx0-9]+)(,\s*(?<rs3>%f[0-9]{1,2})(,\s*(?<rs4>%f[0-9]{1,2}))?)?/
-               &undes($1,$+{rs1},$+{rs2},$+{rs3},$+{rs4})
+       s/\b(des_\w+)\s+(%f[0-9]{1,2}),\s*([%fx0-9]+)(?:,\s*(%f[0-9]{1,2})(?:,\s*(%f[0-9]{1,2}))?)?/
+               &undes($1,$2,$3,$4,$5)
         /geo or
        s/\b(mov[ds]to\w+)\s+(%f[0-9]{1,2}),\s*(%[goli][0-7])/
                &unmovxtox($1,$2,$3)