提交 7c510d6f 编写于 作者: D Dr. Stephen Henson

Initial attempt at Whirlpool assembler support on VC++.

上级 7bbcb2f6
...@@ -53,6 +53,11 @@ cd crypto\rc5\asm ...@@ -53,6 +53,11 @@ cd crypto\rc5\asm
perl rc5-586.pl win32 > r5_win32.asm perl rc5-586.pl win32 > r5_win32.asm
cd ..\..\.. cd ..\..\..
echo Whirlpool
cd crypto\whrlpool\asm
perl wp-mmx.pl win32 > wp_win32.asm
cd ..\..\..
echo on echo on
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
......
...@@ -54,6 +54,11 @@ cd crypto\rc5\asm ...@@ -54,6 +54,11 @@ cd crypto\rc5\asm
perl rc5-586.pl win32n > r5_win32.asm perl rc5-586.pl win32n > r5_win32.asm
cd ..\..\.. cd ..\..\..
echo Whirlpool
cd crypto\whrlpool\asm
perl wp-mmx.pl win32n > wp_win32.asm
cd ..\..\..
echo on echo on
perl util\mkfiles.pl >MINFO perl util\mkfiles.pl >MINFO
......
...@@ -414,6 +414,8 @@ SHA1_ASM_OBJ=$sha1_asm_obj ...@@ -414,6 +414,8 @@ SHA1_ASM_OBJ=$sha1_asm_obj
SHA1_ASM_SRC=$sha1_asm_src SHA1_ASM_SRC=$sha1_asm_src
RMD160_ASM_OBJ=$rmd160_asm_obj RMD160_ASM_OBJ=$rmd160_asm_obj
RMD160_ASM_SRC=$rmd160_asm_src RMD160_ASM_SRC=$rmd160_asm_src
WHIRLPOOL_ASM_OBJ=$whirlpool_asm_obj
WHIRLPOOL_ASM_SRC=$whirlpool_asm_src
# The output directory for everything intersting # The output directory for everything intersting
OUT_D=$out_dir OUT_D=$out_dir
...@@ -657,6 +659,11 @@ foreach (values %lib_nam) ...@@ -657,6 +659,11 @@ foreach (values %lib_nam)
$lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/; $lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/;
$rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src); $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src);
} }
if (($whirlpool_asm_obj ne "") && ($_ eq "CRYPTO"))
{
$lib_obj =~ s/\s(\S*\/wp_dgst\S*)/ $1 \$(WHIRLPOOL_ASM_OBJ)/;
$rules.=&do_asm_rule($whirlpool_asm_obj,$whirlpool_asm_src);
}
$defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj); $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj);
$lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)"; $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)";
$rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib); $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib);
...@@ -840,6 +847,7 @@ sub do_defs ...@@ -840,6 +847,7 @@ sub do_defs
elsif ($_ =~ /MD5_ASM/) { $t="$_ "; } elsif ($_ =~ /MD5_ASM/) { $t="$_ "; }
elsif ($_ =~ /SHA1_ASM/){ $t="$_ "; } elsif ($_ =~ /SHA1_ASM/){ $t="$_ "; }
elsif ($_ =~ /RMD160_ASM/){ $t="$_ "; } elsif ($_ =~ /RMD160_ASM/){ $t="$_ "; }
elsif ($_ =~ /WHIRLPOOL_ASM/){ $t="$_ "; }
else { $t="$location${o}$_$pf "; } else { $t="$location${o}$_$pf "; }
$Vars{$var}.="$t "; $Vars{$var}.="$t ";
......
...@@ -194,7 +194,9 @@ if (!$no_asm) ...@@ -194,7 +194,9 @@ if (!$no_asm)
$sha1_asm_src='crypto\sha\asm\s1_win32.asm'; $sha1_asm_src='crypto\sha\asm\s1_win32.asm';
$rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj'; $rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj';
$rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm'; $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
$cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; $whirlpool_asm_obj='crypto\whrlpool\asm\wp_win32.obj';
$whirlpool_asm_src='crypto\whrlpool\asm\wp_win32.asm';
$cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DWHIRLPOOL_ASM";
} }
if ($shlib && $FLAVOR !~ /CE/) if ($shlib && $FLAVOR !~ /CE/)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册