]> WPIA git - cassiopeia.git/blobdiff - lib/openssl/crypto/camellia/asm/cmll-x86_64.pl
upd: openssl to 1.1.0
[cassiopeia.git] / lib / openssl / crypto / camellia / asm / cmll-x86_64.pl
index 9f4b82fa48219540f398e483a8a1dc852868e328..da5ad7b7e0e7d3fc6a39c4dd90192f8d5a455d8b 100644 (file)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2008-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
+
 
 # ====================================================================
 # Copyright (c) 2008 Andy Polyakov <appro@openssl.org>
@@ -40,7 +47,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
 die "can't locate x86_64-xlate.pl";
 
-open OUT,"| \"$^X\" $xlate $flavour $output";
+open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
 *STDOUT=*OUT;
 
 sub hi() { my $r=shift; $r =~ s/%[er]([a-d])x/%\1h/;    $r; }
@@ -72,7 +79,7 @@ my $i=@_[0];
 my $seed=defined(@_[1])?@_[1]:0;
 my $scale=$seed<0?-8:8;
 my $j=($i&1)*2;
-my $s0=@S[($j)%4],$s1=@S[($j+1)%4],$s2=@S[($j+2)%4],$s3=@S[($j+3)%4];
+my ($s0,$s1,$s2,$s3)=(@S[($j)%4],@S[($j+1)%4],@S[($j+2)%4],@S[($j+3)%4]);
 
 $code.=<<___;
        xor     $s0,$t0                         # t0^=key[0]
@@ -409,7 +416,7 @@ Camellia_Ekeygen:
        push    %r15
 .Lkey_prologue:
 
-       mov     %rdi,$keyend            # put away arguments, keyBitLength
+       mov     %edi,${keyend}d         # put away arguments, keyBitLength
        mov     %rdx,$out               # keyTable
 
        mov     0(%rsi),@S[0]           # load 0-127 bits