Don't use inline assembler when configured for "no-asm".
authorBodo Möller <bodo@openssl.org>
Wed, 23 Jun 1999 12:18:31 +0000 (12:18 +0000)
committerBodo Möller <bodo@openssl.org>
Wed, 23 Jun 1999 12:18:31 +0000 (12:18 +0000)
Configure
crypto/md32_common.h
crypto/sha/sha_locl.h

index c3e546bc1a264c373cd9c0a116b45a3ce5fb8e95..c8749f79441050c58f907723a93cd0f045a25515 100755 (executable)
--- 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$/)
index e88d78c27baece7d7bdf912b7d9092778964f180..2b91f9eef2a59dd8b31f87d52f75601d3df71749 100644 (file)
 #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
  * 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 <appro@fy.chalmers.se> */
 #  if defined(__i386) && !defined(I386_ONLY)
 #   define BE_FETCH32(a)       ({ register unsigned int l=(a);\
index ac85029af2b96300eeb0816d0996c02e3939b45a..6646a8915b757291e8b840329761018381e75aa7 100644 (file)
 #define ROTATE(a,n)     _lrotl(a,n)
 #elif defined(__GNUC__) && !defined(PEDANTIC)
 /* some inline assembler templates by <appro@fy.chalmers.se> */
-#if defined(__i386)
+#if defined(__i386) && !defined(NO_ASM)
 #define ROTATE(a,n)    ({ register unsigned int ret;   \
                                asm ("roll %1,%0"       \
                                : "=r"(ret)             \