X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=crypto%2Fmd5%2Fasm%2Fmd5-x86_64.pl;h=99cbbea7749cc63d069a6339b2e875b9b618a9e3;hb=32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69;hp=eea6802a8a70b172a2bca8053f3425ce7996e14f;hpb=6251989eb6168c1baada70c5b16c7742861d3d03;p=oweals%2Fopenssl.git diff --git a/crypto/md5/asm/md5-x86_64.pl b/crypto/md5/asm/md5-x86_64.pl index eea6802a8a..99cbbea774 100755 --- a/crypto/md5/asm/md5-x86_64.pl +++ b/crypto/md5/asm/md5-x86_64.pl @@ -1,11 +1,13 @@ -#!/usr/bin/perl -w -# -# MD5 optimized for AMD64. -# +#! /usr/bin/env perl # Author: Marc Bevand -# 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 Apache License 2.0 (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; @@ -47,8 +49,8 @@ sub round2_step $code .= " mov %edx, %r12d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1); $code .= <= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef; +my $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef; my $win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); @@ -116,8 +131,9 @@ $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"; -no warnings qw(uninitialized); -open STDOUT,"| \"$^X\" $xlate $flavour $output"; +open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"" + or die "can't call $xlate: $!"; +*STDOUT=*OUT; $code .= <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 @@ -363,4 +392,4 @@ ___ print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT";