summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-01 08:58:34 -0700
committerJosé Fonseca <[email protected]>2009-09-14 20:12:01 +0100
commit88b88bba68af2f5d3243ebc77f32e47aa747d5f7 (patch)
treebff5f78db1e7c9c44eeaddeca124f69e79ed969e /src/gallium
parentaa522e6cc434fbe37203152de2d5d513ab640c67 (diff)
util: Add _BitScanForward intrinsic's declaration.
It is missing in some Microsoft DDKs.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_math.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index b12c97dfb4d..b428dc544c3 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -354,7 +354,9 @@ util_is_pot(unsigned x)
* Find first bit set in word. Least significant bit is 1.
* Return 0 if no bits set.
*/
-#if defined(_MSC_VER) && _MSC_VER >= 1300
+#if defined(_MSC_VER) && _MSC_VER >= 1300 && (_M_IX86 || _M_AMD64 || _M_IA64)
+unsigned char _BitScanForward(unsigned long* Index, unsigned long Mask);
+#pragma intrinsic(_BitScanForward)
static INLINE
unsigned long ffs( unsigned long u )
{