From a43ce912fc025d11e1395506111f75fc194d7ba5 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 13 Sep 2018 19:18:07 +0000 Subject: Import OpenSSL 1.1.1. --- crypto/md5/asm/md5-x86_64.pl | 55 +++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'crypto/md5/asm/md5-x86_64.pl') diff --git a/crypto/md5/asm/md5-x86_64.pl b/crypto/md5/asm/md5-x86_64.pl index 381bf77e1c6b..386d8048ec02 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 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; @@ -25,8 +27,8 @@ sub round1_step xor $y, %r11d /* y ^ ... */ lea $T_i($dst,%r10d),$dst /* Const + dst + ... */ and $x, %r11d /* x & ... */ - xor $z, %r11d /* z ^ ... */ mov $k_next*4(%rsi),%r10d /* (NEXT STEP) X[$k_next] */ + xor $z, %r11d /* z ^ ... */ add %r11d, $dst /* dst += ... */ rol \$$s, $dst /* dst <<< s */ mov $y, %r11d /* (NEXT STEP) z' = $y */ @@ -43,13 +45,12 @@ EOF sub round2_step { my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; - $code .= " mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */\n" if ($pos == -1); $code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1); $code .= " mov %edx, %r12d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1); $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 -- cgit v1.2.3