diff options
author | Andy Polyakov <appro@openssl.org> | 2007-08-23 12:13:55 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2007-08-23 12:13:55 +0000 |
commit | 0406ce26460d2b656ddcb3ffadc325d1cc91da15 (patch) | |
tree | f51cb7afbf8cd99548bb728beb2c70607d3312e7 | |
parent | 76108ba7eb162f2f280109b04285f74c9b5b140b (diff) | |
download | openssl-0406ce26460d2b656ddcb3ffadc325d1cc91da15.zip openssl-0406ce26460d2b656ddcb3ffadc325d1cc91da15.tar.gz openssl-0406ce26460d2b656ddcb3ffadc325d1cc91da15.tar.bz2 |
Engage x86_64 assembler in Win64 build.
-rw-r--r-- | ms/do_fips.bat | 97 | ||||
-rw-r--r-- | ms/segrenam.pl | 1 | ||||
-rwxr-xr-x | util/mk1mf.pl | 1 | ||||
-rw-r--r-- | util/pl/VC-32.pl | 19 |
4 files changed, 83 insertions, 35 deletions
diff --git a/ms/do_fips.bat b/ms/do_fips.bat index 3b5a83b..d82e97b 100644 --- a/ms/do_fips.bat +++ b/ms/do_fips.bat @@ -1,8 +1,6 @@ - @echo off -SET ASMOPTS=-DOPENSSL_IA32_SSE2 -SET ASM=no-asm +SET ASM=%1 if NOT X%PROCESSOR_ARCHITECTURE% == X goto defined @@ -25,38 +23,10 @@ echo Auto Configuring for X86 SET TARGET=VC-WIN32 -if NOT x%1% == xno-asm SET ASM=nasm - -goto compile - -:IA64 - -echo Auto Configuring for IA64 -SET TARGET=VC-WIN64I -perl ms\uplink.pl win64i > ms\uptable.asm -if ERRORLEVEL 1 goto error -ias -o ms\uptable.obj ms\uptable.asm -if ERRORLEVEL 1 goto error - -goto compile - -:AMD64 - -echo Auto Configuring for AMD64 -SET TARGET=VC-WIN64A -perl ms\uplink.pl win64a > ms\uptable.asm -if ERRORLEVEL 1 goto error -ml64 -c -Foms\uptable.obj ms\uptable.asm -if ERRORLEVEL 1 goto error - - -:compile - -perl Configure %TARGET% fipscanisterbuild -pause - -if %ASM% == no-asm goto skipasm +if x%ASM% == xno-asm goto compile echo Generating x86 for NASM assember +SET ASM=nasm +SET ASMOPTS=-DOPENSSL_IA32_SSE2 echo Bignum cd crypto\bn\asm @@ -138,7 +108,64 @@ perl x86cpuid.pl win32n %ASMOPTS% > cpu_win32.asm if ERRORLEVEL 1 goto error cd .. -:skipasm +goto compile + +:IA64 + +echo Auto Configuring for IA64 +SET TARGET=VC-WIN64I +perl ms\uplink.pl win64i > ms\uptable.asm +if ERRORLEVEL 1 goto error +ias -o ms\uptable.obj ms\uptable.asm +if ERRORLEVEL 1 goto error + +goto compile + +:AMD64 + +echo Auto Configuring for AMD64 +SET TARGET=VC-WIN64A +perl ms\uplink.pl win64a > ms\uptable.asm +if ERRORLEVEL 1 goto error +ml64 -c -Foms\uptable.obj ms\uptable.asm +if ERRORLEVEL 1 goto error + +if x%ASM% == xno-asm goto compile +echo Generating x86_64 for ML64 assember +SET ASM=ml64 + +echo Bignum +cd crypto\bn\asm +perl x86_64-mont.pl x86_64-mont.asm +if ERRORLEVEL 1 goto error +cd ..\..\.. + +echo AES +cd crypto\aes\asm +perl aes-x86_64.pl aes-x86_64.asm +if ERRORLEVEL 1 goto error +cd ..\..\.. + +echo SHA +cd crypto\sha\asm +perl sha1-x86_64.pl sha1-x86_64.asm +if ERRORLEVEL 1 goto error +perl sha512-x86_64.pl sha256-x86_64.asm +if ERRORLEVEL 1 goto error +perl sha512-x86_64.pl sha512-x86_64.asm +if ERRORLEVEL 1 goto error +cd ..\..\.. + +echo CPU-ID +cd crypto +perl x86_64cpuid.pl cpuid-x86_64.asm +if ERRORLEVEL 1 goto error +cd .. + +:compile + +perl Configure %TARGET% fipscanisterbuild +pause echo on diff --git a/ms/segrenam.pl b/ms/segrenam.pl index 8be9888..2ab22a0 100644 --- a/ms/segrenam.pl +++ b/ms/segrenam.pl @@ -9,6 +9,7 @@ $suffix=(@ARGV[0]=~/^\$/) ? shift(@ARGV) : "\$m"; ################################################################# # rename segments in COFF modules according to %map table below # %map=( ".text" => "fipstx$suffix", # + ".text\$"=> "fipstx$suffix", # ".rdata"=> "fipsrd$suffix", # ".data" => "fipsda$suffix" ); # ################################################################# diff --git a/util/mk1mf.pl b/util/mk1mf.pl index 4fb070e..95daff5 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -1277,6 +1277,7 @@ sub read_options "no-hmac" => \$no_hmac, "no-asm" => \$no_asm, "nasm" => \$nasm, + "ml64" => \$ml64, "nw-nasm" => \$nw_nasm, "nw-mwasm" => \$nw_mwasm, "gaswin" => \$gaswin, diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl index e61a997..af3569c 100644 --- a/util/pl/VC-32.pl +++ b/util/pl/VC-32.pl @@ -172,6 +172,10 @@ $app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/); if ($nasm) { $asm='nasmw -f win32'; $afile='-o '; +} elsif ($ml64) { + $asm='ml64 /c /Cp /Cx'; + $asm.=' /Zi' if $debug; + $afile='/Fo'; } else { $asm='ml /Cp /coff /c /Cx'; $asm.=" /Zi" if $debug; @@ -187,6 +191,8 @@ $bf_enc_obj=''; $bf_enc_src=''; if (!$no_asm) + { + if ($FLAVOR =~ "WIN32") { $aes_asm_obj='crypto\aes\asm\a_win32.obj'; $aes_asm_src='crypto\aes\asm\a_win32.asm'; @@ -214,6 +220,19 @@ if (!$no_asm) $cpuid_asm_src='crypto\cpu_win32.asm'; $cflags.=" -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; } + elsif ($FLAVOR =~ "WIN64A") + { + $aes_asm_obj='$(OBJ_D)\aes-x86_64.obj'; + $aes_asm_src='crypto\aes\asm\aes-x86_64.asm'; + $bn_asm_obj='$(OBJ_D)\x86_64-mont.obj $(OBJ_D)\bn_asm.obj'; + $bn_asm_src='crypto\bn\asm\x86_64-mont.asm'; + $sha1_asm_obj='$(OBJ_D)\sha1-x86_64.obj $(OBJ_D)\sha256-x86_64.obj $(OBJ_D)\sha512-x86_64.obj'; + $sha1_asm_src='crypto\sha\asm\sha1-x86_64.asm crypto\sha\asm\sha256-x86_64.asm crypto\sha\asm\sha512-x86_64.asm'; + $cpuid_asm_obj='$(OBJ_D)\cpuid-x86_64.obj'; + $cpuid_asm_src='crypto\cpuid-x86_64.asm'; + $cflags.=" -DOPENSSL_CPUID_OBJ -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM"; + } + } if ($shlib && $FLAVOR !~ /CE/) { |