Uses portable ROTATE_LEFT for x86/Linux (dotnet/coreclr#8367)
authorJonghyun Park <parjong@gmail.com>
Wed, 30 Nov 2016 19:39:21 +0000 (04:39 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Wed, 30 Nov 2016 19:39:21 +0000 (20:39 +0100)
Commit migrated from https://github.com/dotnet/coreclr/commit/8421585791a6a8d7c7237b673944474643f06a6b

src/coreclr/src/utilcode/md5.cpp

index 1c7b31f..8d6f8a3 100644 (file)
@@ -132,7 +132,7 @@ void MD5::GetHashValue(MD5HASHDATA* phash)
     //
     // but our compiler has an intrinsic!
 
-    #if defined(_ARM_) && defined(PLATFORM_UNIX)
+    #if (defined(_X86_) || defined(_ARM_)) && defined(PLATFORM_UNIX)
     #define ROL(x, n)        (((x) << (n)) | ((x) >> (32-(n))))
     #define ROTATE_LEFT(x,n) (x) = ROL(x,n)
     #else