]> WPIA git - cassiopeia.git/blobdiff - lib/openssl/crypto/bn/asm/x86-gf2m.pl
upd: openssl to 1.1.0
[cassiopeia.git] / lib / openssl / crypto / bn / asm / x86-gf2m.pl
index 808a1e59691de3b144169cc452c5c7aa143694c5..f4643687332f4623dad84310f76e3430e578b6b8 100644 (file)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2011-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
+
 #
 # ====================================================================
 # Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
@@ -14,7 +21,7 @@
 # the time being... Except that it has three code paths: pure integer
 # code suitable for any x86 CPU, MMX code suitable for PIII and later
 # and PCLMULQDQ suitable for Westmere and later. Improvement varies
-# from one benchmark and �-arch to another. Below are interval values
+# from one benchmark and �-arch to another. Below are interval values
 # for 163- and 571-bit ECDH benchmarks relative to compiler-generated
 # code:
 #
@@ -36,6 +43,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0,$x86only = $ARGV[$#ARGV] eq "386");
 
 $sse2=0;
@@ -226,22 +236,22 @@ if ($sse2) {
        &push   ("edi");
        &mov    ($a,&wparam(1));
        &mov    ($b,&wparam(3));
-       &call   ("_mul_1x1_mmx");       # a1�b1
+       &call   ("_mul_1x1_mmx");       # a1�b1
        &movq   ("mm7",$R);
 
        &mov    ($a,&wparam(2));
        &mov    ($b,&wparam(4));
-       &call   ("_mul_1x1_mmx");       # a0�b0
+       &call   ("_mul_1x1_mmx");       # a0�b0
        &movq   ("mm6",$R);
 
        &mov    ($a,&wparam(1));
        &mov    ($b,&wparam(3));
        &xor    ($a,&wparam(2));
        &xor    ($b,&wparam(4));
-       &call   ("_mul_1x1_mmx");       # (a0+a1)�(b0+b1)
+       &call   ("_mul_1x1_mmx");       # (a0+a1)�(b0+b1)
        &pxor   ($R,"mm7");
        &mov    ($a,&wparam(0));
-       &pxor   ($R,"mm6");             # (a0+a1)�(b0+b1)-a1�b1-a0�b0
+       &pxor   ($R,"mm6");             # (a0+a1)·(b0+b1)-a1·b1-a0��b0
 
        &movq   ($A,$R);
        &psllq  ($R,32);
@@ -266,13 +276,13 @@ if ($sse2) {
 
        &mov    ($a,&wparam(1));
        &mov    ($b,&wparam(3));
-       &call   ("_mul_1x1_ialu");      # a1�b1
+       &call   ("_mul_1x1_ialu");      # a1�b1
        &mov    (&DWP(8,"esp"),$lo);
        &mov    (&DWP(12,"esp"),$hi);
 
        &mov    ($a,&wparam(2));
        &mov    ($b,&wparam(4));
-       &call   ("_mul_1x1_ialu");      # a0�b0
+       &call   ("_mul_1x1_ialu");      # a0�b0
        &mov    (&DWP(0,"esp"),$lo);
        &mov    (&DWP(4,"esp"),$hi);
 
@@ -280,7 +290,7 @@ if ($sse2) {
        &mov    ($b,&wparam(3));
        &xor    ($a,&wparam(2));
        &xor    ($b,&wparam(4));
-       &call   ("_mul_1x1_ialu");      # (a0+a1)�(b0+b1)
+       &call   ("_mul_1x1_ialu");      # (a0+a1)�(b0+b1)
 
        &mov    ("ebp",&wparam(0));
                 @r=("ebx","ecx","edi","esi");
@@ -311,3 +321,5 @@ if ($sse2) {
 &asciz ("GF(2^m) Multiplication for x86, CRYPTOGAMS by <appro\@openssl.org>");
 
 &asm_finish();
+
+close STDOUT;