Bug 331043: test only compiler predefined macros. Also test for _M_X64,
authorwtc%google.com
Sun, 27 Jan 2008 01:53:42 +0000
changeset 3917 48b798569e7632a54049cb60e93660ca5c8ad31b
parent 3916 58442ed25c5c0c099a952f86d0e31c410ac1c007
child 3918 61493b533829973b1922bcd90a1a1bc645bd8b41
push idunknown
push userunknown
push dateunknown
bugs331043
Bug 331043: test only compiler predefined macros. Also test for _M_X64, which replaces _M_AMD64.
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(_M_IX86) || \
-    defined(_AMD64_) || defined(_M_AMD64))
+#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
+    defined(_M_X64))
 #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