diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 5d656ecc..117614e9 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -13,8 +13,8 @@ else() message("Using masm") set(PERLASM_STYLE masm) else() - message("Using win32n") - set(PERLASM_STYLE win32n) + message("Using win32") + set(PERLASM_STYLE win32) endif() set(ASM_EXT asm) enable_language(ASM_MASM) @@ -27,9 +27,10 @@ function(perlasm dest src) DEPENDS ${src} ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl - ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl - ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl + ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl + ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl + ${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl WORKING_DIRECTORY . ) endfunction() diff --git a/crypto/bn/generic.c b/crypto/bn/generic.c index b745750e..c60cfd97 100644 --- a/crypto/bn/generic.c +++ b/crypto/bn/generic.c @@ -61,7 +61,7 @@ #include "internal.h" -#if defined(OPENSSL_WINDOWS) || defined(OPENSSL_NO_ASM) || \ +#if defined(OPENSSL_NO_ASM) || \ (!defined(OPENSSL_X86_64) && !defined(OPENSSL_X86)) #if defined(OPENSSL_WINDOWS) diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl index bab15e7c..3c7be40c 100644 --- a/crypto/perlasm/x86asm.pl +++ b/crypto/perlasm/x86asm.pl @@ -235,9 +235,9 @@ sub ::asciz sub ::asm_finish { &file_end(); - print "#if defined(__i386__)\n"; + print "#if defined(__i386__)\n" unless $win32; print @out; - print "#endif\n"; + print "#endif\n" unless $win32; } sub ::asm_init diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl index 1741342c..a491529e 100644 --- a/crypto/perlasm/x86masm.pl +++ b/crypto/perlasm/x86masm.pl @@ -82,7 +82,7 @@ TITLE $_[0].asm IF \@Version LT 800 ECHO MASM version 8.00 or later is strongly recommended. ENDIF -.486 +.686 .MODEL FLAT OPTION DOTNAME IF \@Version LT 800 @@ -166,7 +166,10 @@ sub ::data_short { push(@out,("DW\t").join(',',@_)."\n"); } sub ::data_word -{ push(@out,("DD\t").join(',',@_)."\n"); } +{ # MASM can't handle long lines, so emit one word at a time. + foreach(@_) + { push(@out,"DD\t$_\n"); } +} sub ::align { push(@out,"ALIGN\t$_[0]\n"); }