x86_64 assembly pack: tolerate spaces in source directory name.
[openssl.git] / crypto / chacha / asm / chacha-x86_64.pl
index 107fc70819d559b2d9f764fec7b8f14bdd2ff7e4..4b1750cd5dea6dd41bd5896ad7e07856e9a94e9d 100755 (executable)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 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
@@ -67,7 +74,7 @@ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([
        $avx = ($2>=3.0) + ($2>3.0);
 }
 
-open OUT,"| \"$^X\" $xlate $flavour $output";
+open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
 *STDOUT=*OUT;
 
 # input parameter block
@@ -1544,13 +1551,13 @@ $code.=<<___;
        je              .Ldone4xop
 
        lea             0x40($inp),$inp         # inp+=64*3
-       vmovdqa         $xa2,0x00(%rsp)
+       vmovdqa         $xa3,0x00(%rsp)
        xor             %r10,%r10
-       vmovdqa         $xb2,0x10(%rsp)
+       vmovdqa         $xb3,0x10(%rsp)
        lea             0x40($out),$out         # out+=64*3
-       vmovdqa         $xc2,0x20(%rsp)
+       vmovdqa         $xc3,0x20(%rsp)
        sub             \$192,$len              # len-=64*3
-       vmovdqa         $xd2,0x30(%rsp)
+       vmovdqa         $xd3,0x30(%rsp)
 
 .Loop_tail4xop:
        movzb           ($inp,%r10),%eax