Support for "multiply high" instruction, see BN_UMULT_HIGH comment in
[openssl.git] / crypto / md32_common.h
index 8d9059f95a16bff6286032697b75e8742480bc7a..a5b838442b398eb32ac7b901736fe50c850844de 100644 (file)
 # if defined(_MSC_VER)
 #  define ROTATE(a,n)  _lrotl(a,n)
 # elif defined(__MWERKS__)
-#  ifdef __POWERPC__
-#   defined ROTATE(a,n)        __rlwinm(a,n,0,31)
+#  if defined(__POWERPC__)
+#   define ROTATE(a,n) __rlwinm(a,n,0,31)
+#  elif defined(__MC68K__)
+    /* Motorola specific tweak. <appro@fy.chalmers.se> */
+#   define ROTATE(a,n) ( n<24 ? __rol(a,n) : __ror(a,32-n) )
 #  else
 #   define ROTATE(a,n) __rol(a,n)
 #  endif
- B
 # elif defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM)
   /*
    * Some GNU C inline assembler templates. Note that these are