/*
- * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
+ * LICENSE: GNU GPL - See COPYING in the top level directory
+ * BSD - See COPYING.ARM in the top level directory
* FILE: lib/rtl/bitmap.c
* PURPOSE: Bitmap functions
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
#define NDEBUG
#include <debug.h>
+// FIXME: hack
+#undef ASSERT
+#define ASSERT(...)
/* DATA *********************************************************************/
{
ULONG Position;
+#ifdef _M_AMD64
+ if (BitScanReverse64(&Position, Value))
+ {
+ return (CCHAR)Position;
+ }
+#else
if (BitScanReverse(&Position, Value >> 32))
{
return (CCHAR)(Position + 32);
{
return (CCHAR)Position;
}
-
+#endif
return -1;
}
{
ULONG Position;
+#ifdef _M_AMD64
+ if (BitScanForward64(&Position, Value))
+ {
+ return (CCHAR)Position;
+ }
+#else
if (BitScanForward(&Position, (ULONG)Value))
{
return (CCHAR)Position;
{
return (CCHAR)(Position + 32);
}
-
+#endif
return -1;
}