Add cpuid code to VC++ build.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 6 Dec 2005 16:35:40 +0000 (16:35 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 Dec 2005 16:35:40 +0000 (16:35 +0000)
ms/do_masm.bat
ms/do_nasm.bat
util/mk1mf.pl
util/pl/VC-32.pl

index 543840a3c5bbefbdb0fc4af73fcd6bc69d9389df..15b379204edfbb60b509fd86755927d432f6f3fc 100755 (executable)
@@ -58,6 +58,11 @@ cd crypto\whrlpool\asm
 perl wp-mmx.pl win32 > wp_win32.asm
 cd ..\..\..
 
+echo CPU-ID
+cd crypto
+perl x86cpuid.pl win32 > cpu_win32.asm
+cd ..
+
 echo on
 
 perl util\mkfiles.pl >MINFO
index 29a95891c6091c78f2db84ba554605828cbceca1..2ec17a34882d958420cb7d496b46ef92b2340038 100755 (executable)
@@ -59,6 +59,11 @@ cd crypto\whrlpool\asm
 perl wp-mmx.pl win32n > wp_win32.asm
 cd ..\..\..
 
+echo CPU-ID
+cd crypto
+perl x86cpuid.pl win32n > cpu_win32.asm
+cd ..
+
 echo on
 
 perl util\mkfiles.pl >MINFO
index 7f901ee934a73b7831fd63c27b822f153902883e..6b3f1a03a19a8c3de298451083ec89424eb9e833 100755 (executable)
@@ -416,6 +416,8 @@ RMD160_ASM_OBJ=$rmd160_asm_obj
 RMD160_ASM_SRC=$rmd160_asm_src
 WHIRLPOOL_ASM_OBJ=$whirlpool_asm_obj
 WHIRLPOOL_ASM_SRC=$whirlpool_asm_src
+CPUID_ASM_OBJ=$cpuid_asm_obj
+CPUID_ASM_SRC=$cpuid_asm_src
 
 # The output directory for everything intersting
 OUT_D=$out_dir
@@ -664,6 +666,11 @@ foreach (values %lib_nam)
                $lib_obj =~ s/\s(\S*\/wp_dgst\S*)/ $1 \$(WHIRLPOOL_ASM_OBJ)/;
                $rules.=&do_asm_rule($whirlpool_asm_obj,$whirlpool_asm_src);
                }
+       if (($cpuid_asm_obj ne "") && ($_ eq "CRYPTO"))
+               {
+               $lib_obj =~ s/\s(\S*\/cversion\S*)/ $1 \$(CPUID_ASM_OBJ)/;
+               $rules.=&do_asm_rule($cpuid_asm_obj,$cpuid_asm_src);
+               }
        $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj);
        $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)";
        $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib);
@@ -848,6 +855,7 @@ sub do_defs
                elsif ($_ =~ /SHA1_ASM/){ $t="$_ "; }
                elsif ($_ =~ /RMD160_ASM/){ $t="$_ "; }
                elsif ($_ =~ /WHIRLPOOL_ASM/){ $t="$_ "; }
+               elsif ($_ =~ /CPUID_ASM/){ $t="$_ "; }
                else    { $t="$location${o}$_$pf "; }
 
                $Vars{$var}.="$t ";
index bbdb5373294432bf3bc11d55ce27aa606cb1362e..94a1e83011263f6e67b0a09bf6bff44ae57d6ff3 100644 (file)
@@ -196,6 +196,8 @@ if (!$no_asm)
        $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
        $whirlpool_asm_obj='crypto\whrlpool\asm\wp_win32.obj';
        $whirlpool_asm_src='crypto\whrlpool\asm\wp_win32.asm';
+       $cpuid_asm_obj='crypto\cpu_win32.obj';
+       $cpuid_asm_src='crypto\cpu_win32.asm';
        $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DWHIRLPOOL_ASM";
        }