Avoid linking error for InitializeCriticalSectionAndSpinCount().
[oweals/openssl.git] / crypto / md5 / asm / md5-x86_64.pl
index 8d820e114024984c8eb0a782a766c1841c406ade..386d8048ec02b29a2581bc324f43890b62cb9d79 100755 (executable)
@@ -1,11 +1,13 @@
-#!/usr/bin/perl -w
-#
-# MD5 optimized for AMD64.
-#
+#! /usr/bin/env perl
 # Author: Marc Bevand <bevand_m (at) epita.fr>
-# Licence: I hereby disclaim the copyright on this code and place it
-# in the public domain.
+# Copyright 2005-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
+
+# MD5 optimized for AMD64.
 
 use strict;
 
@@ -128,7 +130,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
 ( $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;
 
 $code .= <<EOF;
@@ -138,11 +140,17 @@ $code .= <<EOF;
 .globl md5_block_asm_data_order
 .type md5_block_asm_data_order,\@function,3
 md5_block_asm_data_order:
+.cfi_startproc
        push    %rbp
+.cfi_push      %rbp
        push    %rbx
+.cfi_push      %rbx
        push    %r12
+.cfi_push      %r12
        push    %r14
+.cfi_push      %r14
        push    %r15
+.cfi_push      %r15
 .Lprologue:
 
        # rdi = arg #1 (ctx, MD5_CTX pointer)
@@ -259,13 +267,20 @@ $code .= <<EOF;
        mov     %edx,           3*4(%rbp)       # ctx->D = D
 
        mov     (%rsp),%r15
+.cfi_restore   %r15
        mov     8(%rsp),%r14
+.cfi_restore   %r14
        mov     16(%rsp),%r12
+.cfi_restore   %r12
        mov     24(%rsp),%rbx
+.cfi_restore   %rbx
        mov     32(%rsp),%rbp
+.cfi_restore   %rbp
        add     \$40,%rsp
+.cfi_adjust_cfa_offset -40
 .Lepilogue:
        ret
+.cfi_endproc
 .size md5_block_asm_data_order,.-md5_block_asm_data_order
 EOF