projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa522e6
)
util: Add _BitScanForward intrinsic's declaration.
author
José Fonseca
<jfonseca@vmware.com>
Mon, 1 Jun 2009 15:58:34 +0000
(08:58 -0700)
committer
José Fonseca
<jfonseca@vmware.com>
Mon, 14 Sep 2009 19:12:01 +0000
(20:12 +0100)
It is missing in some Microsoft DDKs.
src/gallium/auxiliary/util/u_math.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_math.h
b/src/gallium/auxiliary/util/u_math.h
index b12c97dfb4da6043dcda8d64b8a7d7532789e934..b428dc544c32ffd437a7c09e110e2f1fcaad389a 100644
(file)
--- 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 )
{