diff options
Diffstat (limited to 'crypto/des/asm/des-586.pl')
-rw-r--r-- | crypto/des/asm/des-586.pl | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/crypto/des/asm/des-586.pl b/crypto/des/asm/des-586.pl index bd6a7dd6b76b..2bcc54ef2f25 100644 --- a/crypto/des/asm/des-586.pl +++ b/crypto/des/asm/des-586.pl @@ -1,8 +1,13 @@ -#!/usr/local/bin/perl +#! /usr/bin/env perl +# Copyright 1995-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 + # The inner loop instruction sequence and the IP/FP modifications are from -# Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk> -# +# Svend Olaf Mikkelsen. $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); @@ -10,12 +15,15 @@ require "x86asm.pl"; require "cbc.pl"; require "desboth.pl"; -# base code is in microsft +# base code is in Microsoft # op dest, source # format. # -&asm_init($ARGV[0],"des-586.pl"); +$output=pop; +open STDOUT,">$output"; + +&asm_init($ARGV[0]); $L="edi"; $R="esi"; @@ -39,6 +47,8 @@ $small_footprint=1 if (grep(/\-DOPENSSL_SMALL_FOOTPRINT/,@ARGV)); &asm_finish(); +close STDOUT; + sub DES_encrypt_internal() { &function_begin_B("_x86_DES_encrypt"); @@ -75,7 +85,7 @@ sub DES_encrypt_internal() &function_end_B("_x86_DES_encrypt"); } - + sub DES_decrypt_internal() { &function_begin_B("_x86_DES_decrypt"); @@ -112,7 +122,7 @@ sub DES_decrypt_internal() &function_end_B("_x86_DES_decrypt"); } - + sub DES_encrypt { local($name,$do_ip)=@_; @@ -273,7 +283,7 @@ sub IP_new &R_PERM_OP($l,$tt,$r,14,"0x33333333",$r); &R_PERM_OP($tt,$r,$l,22,"0x03fc03fc",$r); &R_PERM_OP($l,$r,$tt, 9,"0xaaaaaaaa",$r); - + if ($lr != 3) { if (($lr-3) < 0) |