Bug 331043: need to test the _M_IX86 macro, which is defined by MSVC.
authorwtc%google.com
Sat, 26 Jan 2008 22:12:10 +0000
changeset 3914 55dc426f5cefa2f0cc65ce206597eff416883f6e
parent 3913 6554ca0c719df6b0684a06e93e14aae9abe45b80
child 3915 3006dc24613ea990843136ff7c22efac47f4edb6
push idunknown
push userunknown
push dateunknown
bugs331043
Bug 331043: need to test the _M_IX86 macro, which is defined by MSVC. _X86_ is defined by <windows.h>.
pr/include/prbit.h
--- a/pr/include/prbit.h
+++ b/pr/include/prbit.h
@@ -116,18 +116,18 @@ NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i
 ** this to a rotate instruction, but MSVC doesn't without a little help.
 ** To get MSVC to generate a rotate instruction, we have to use the _rotl
 ** or _rotr intrinsic and use a pragma to make it inline.
 **
 ** Note: MSVC in VS2005 will do an inline rotate instruction on the above
 ** construct.
 */
 
-#if defined(_MSC_VER) && (defined(_X86_) || defined(_AMD64_) || \
-    defined(_M_AMD64))
+#if defined(_MSC_VER) && (defined(_X86_) || defined(_M_IX86) || \
+    defined(_AMD64_) || defined(_M_AMD64))
 #include <stdlib.h>
 #pragma intrinsic(_rotl, _rotr)
 #define PR_ROTATE_LEFT32(a, bits) _rotl(a, bits)
 #define PR_ROTATE_RIGHT32(a, bits) _rotr(a, bits)
 #else
 #define PR_ROTATE_LEFT32(a, bits) (((a) << (bits)) | ((a) >> (32 - (bits))))
 #define PR_ROTATE_RIGHT32(a, bits) (((a) >> (bits)) | ((a) << (32 - (bits))))
 #endif