diff options
Diffstat (limited to 'crypto/ripemd/asm/rmd-586.pl')
-rw-r--r-- | crypto/ripemd/asm/rmd-586.pl | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/crypto/ripemd/asm/rmd-586.pl b/crypto/ripemd/asm/rmd-586.pl index e8b2bc2db2de..84aa7ced17c0 100644 --- a/crypto/ripemd/asm/rmd-586.pl +++ b/crypto/ripemd/asm/rmd-586.pl @@ -1,4 +1,11 @@ -#!/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 + # Normal is the # ripemd160_block_asm_data_order(RIPEMD160_CTX *c, ULONG *X,int blocks); @@ -9,7 +16,10 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; -&asm_init($ARGV[0],$0); +$output=pop; +open STDOUT,">$output"; + +&asm_init($ARGV[0]); $A="ecx"; $B="esi"; @@ -24,7 +34,7 @@ $KL2=0x6ED9EBA1; $KL3=0x8F1BBCDC; $KL4=0xA953FD4E; $KR0=0x50A28BE6; -$KR1=0x5C4DD124; +$KR1=0x5C4DD124; $KR2=0x6D703EF3; $KR3=0x7A6D76E9; @@ -60,6 +70,8 @@ $KR3=0x7A6D76E9; &ripemd160_block("ripemd160_block_asm_data_order"); &asm_finish(); +close STDOUT; + sub Xv { local($n)=@_; @@ -327,7 +339,6 @@ sub ripemd160_block # aligned. The good news are that gcc-2.95 # and later does keep first argument at # least double-wise aligned. - # <appro@fy.chalmers.se> &set_label("start") unless $normal; &comment(""); @@ -531,28 +542,28 @@ sub ripemd160_block # &mov($tmp2, &wparam(0)); # Moved into last round &mov($tmp1, &DWP( 4,$tmp2,"",0)); # ctx->B - &add($D, $tmp1); + &add($D, $tmp1); &mov($tmp1, &swtmp(16+2)); # $c &add($D, $tmp1); &mov($tmp1, &DWP( 8,$tmp2,"",0)); # ctx->C - &add($E, $tmp1); + &add($E, $tmp1); &mov($tmp1, &swtmp(16+3)); # $d &add($E, $tmp1); &mov($tmp1, &DWP(12,$tmp2,"",0)); # ctx->D - &add($A, $tmp1); + &add($A, $tmp1); &mov($tmp1, &swtmp(16+4)); # $e &add($A, $tmp1); &mov($tmp1, &DWP(16,$tmp2,"",0)); # ctx->E - &add($B, $tmp1); + &add($B, $tmp1); &mov($tmp1, &swtmp(16+0)); # $a &add($B, $tmp1); &mov($tmp1, &DWP( 0,$tmp2,"",0)); # ctx->A - &add($C, $tmp1); + &add($C, $tmp1); &mov($tmp1, &swtmp(16+1)); # $b &add($C, $tmp1); |