Fix some style issues...
[openssl.git] / crypto / bn / asm / bn-586.pl
index 3651c0d818632c41410cf10ecd89dc081a6df867..1ca1bbf7d4e17fdbe7e748a542ab27aa4d20d560 100644 (file)
@@ -1,8 +1,19 @@
-#!/usr/local/bin/perl
+#! /usr/bin/env perl
+# Copyright 1995-2016 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
 
-push(@INC,"perlasm","../../perlasm");
+
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0);
 
 $sse2=0;
@@ -20,6 +31,8 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
 
 &asm_finish();
 
+close STDOUT;
+
 sub bn_mul_add_words
        {
        local($name)=@_;
@@ -340,7 +353,7 @@ sub bn_sqr_words
                &movd("mm0",&DWP(0,$a));        # mm0 = a[i]
                &pmuludq("mm0","mm0");          # a[i] *= a[i]
                &lea($a,&DWP(4,$a));            # a++
-               &movq(&DWP(0,$r),"mm0");        # r[i] = a[i]*a[i]
+               &movq(&QWP(0,$r),"mm0");        # r[i] = a[i]*a[i]
                &sub($c,1);
                &lea($r,&DWP(8,$r));            # r += 2
                &jnz(&label("sqr_sse2_loop"));
@@ -770,4 +783,3 @@ sub bn_sub_part_words
 
        &function_end($name);
        }
-