Remove unnecessary trailing whitespace
[openssl.git] / crypto / bn / asm / sparct4-mont.pl
index 7ec83c2c9c224bf06c1a8bcf99ffe645e5ca6899..fcae9cfc5b44bf43877c9ec1cddc64eca594a7e9 100755 (executable)
@@ -1,9 +1,16 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2012-2018 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
 
 # ====================================================================
-# Written by David S. Miller <davem@devemloft.net> and Andy Polyakov
-# <appro@openssl.org>. The module is licensed under 2-clause BSD
-# license. November 2012. All rights reserved.
+# Written by David S. Miller and Andy Polyakov
+# The module is licensed under 2-clause BSD license.
+# November 2012. All rights reserved.
 # ====================================================================
 
 ######################################################################
@@ -881,19 +888,17 @@ $code.=<<___;
        sub     $tp,    $num,   $tp
        sub     $rp,    $num,   $rp
 
-       subc    $ovf,   %g0,    $ovf    ! handle upmost overflow bit
-       and     $tp,    $ovf,   $ap
-       andn    $rp,    $ovf,   $np
-       or      $np,    $ap,    $ap     ! ap=borrow?tp:rp
+       subccc  $ovf,   %g0,    $ovf    ! handle upmost overflow bit
        ba      .Lcopy
        sub     $num,   8,      $cnt
 
 .align 16
-.Lcopy:                                        ! copy or in-place refresh
-       ldx     [$ap+0],        $t2
-       add     $ap,    8,      $ap
+.Lcopy:                                        ! conditional copy
+       ldx     [$tp],          $tj
+       ldx     [$rp+0],        $t2
        stx     %g0,    [$tp]           ! zap
        add     $tp,    8,      $tp
+       movcs   %icc,   $tj,    $t2
        stx     $t2,    [$rp+0]
        add     $rp,    8,      $rp
        brnz    $cnt,   .Lcopy
@@ -1129,19 +1134,17 @@ $code.=<<___;
        sub     $tp,    $num,   $tp
        sub     $rp,    $num,   $rp
 
-       subc    $ovf,   %g0,    $ovf    ! handle upmost overflow bit
-       and     $tp,    $ovf,   $ap
-       andn    $rp,    $ovf,   $np
-       or      $np,    $ap,    $ap     ! ap=borrow?tp:rp
+       subccc  $ovf,   %g0,    $ovf    ! handle upmost overflow bit
        ba      .Lcopy_g5
        sub     $num,   8,      $cnt
 
 .align 16
-.Lcopy_g5:                             ! copy or in-place refresh
-       ldx     [$ap+0],        $t2
-       add     $ap,    8,      $ap
+.Lcopy_g5:                             ! conditional copy
+       ldx     [$tp],          $tj
+       ldx     [$rp+0],        $t2
        stx     %g0,    [$tp]           ! zap
        add     $tp,    8,      $tp
+       movcs   %icc,   $tj,    $t2
        stx     $t2,    [$rp+0]
        add     $rp,    8,      $rp
        brnz    $cnt,   .Lcopy_g5