From 946cbf67afc5a76394008bcad9efa67deeefb172 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Wed, 23 Jun 1999 12:18:31 +0000 Subject: [PATCH] Don't use inline assembler when configured for "no-asm". --- Configure | 5 ++++- crypto/md32_common.h | 4 ++-- crypto/sha/sha_locl.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Configure b/Configure index c3e546bc1a..c8749f7944 100755 --- a/Configure +++ b/Configure @@ -330,7 +330,10 @@ my $options=""; foreach (@ARGV) { if (/^no-asm$/) - { $no_asm=1; } + { + $no_asm=1; + $flags .= "-DNO_ASM "; + } elsif (/^no-threads$/) { $no_threads=1; } elsif (/^threads$/) diff --git a/crypto/md32_common.h b/crypto/md32_common.h index e88d78c27b..2b91f9eef2 100644 --- a/crypto/md32_common.h +++ b/crypto/md32_common.h @@ -179,7 +179,7 @@ #ifndef PEDANTIC # if defined(_MSC_VER) # define ROTATE(a,n) _lrotl(a,n) -# elif defined(__GNUC__) && __GNUC__>=2 +# elif defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM) /* * Some GNU C inline assembler templates. Note that these are * rotates by *constant* number of bits! But that's exactly @@ -211,7 +211,7 @@ * Engage compiler specific "fetch in reverse byte order" * intrinsic function if available. */ -# if defined(__GNUC__) && __GNUC__>=2 +# if defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM) /* some GNU C inline assembler templates by */ # if defined(__i386) && !defined(I386_ONLY) # define BE_FETCH32(a) ({ register unsigned int l=(a);\ diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_locl.h index ac85029af2..6646a8915b 100644 --- a/crypto/sha/sha_locl.h +++ b/crypto/sha/sha_locl.h @@ -170,7 +170,7 @@ #define ROTATE(a,n) _lrotl(a,n) #elif defined(__GNUC__) && !defined(PEDANTIC) /* some inline assembler templates by */ -#if defined(__i386) +#if defined(__i386) && !defined(NO_ASM) #define ROTATE(a,n) ({ register unsigned int ret; \ asm ("roll %1,%0" \ : "=r"(ret) \ -- 2.25.1