mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
pathc from w3seek : bug 1702 : Fix BitScanReverse()
svn path=/trunk/; revision=23156
This commit is contained in:
@@ -3818,13 +3818,13 @@ static __inline__ BOOLEAN
|
||||
BitScanReverse(OUT ULONG *Index,
|
||||
IN ULONG Mask)
|
||||
{
|
||||
LONG OldBit;
|
||||
__asm__ __volatile__("bsrl %1,%2\n\t"
|
||||
"sbbl %0,%0\n\t"
|
||||
:"=r" (OldBit),"=m" (*Index)
|
||||
:"Ir" (Mask)
|
||||
: "memory");
|
||||
return OldBit;
|
||||
BOOLEAN BitPosition = 0;
|
||||
__asm__ __volatile__("bsrl %2,%0\n\t"
|
||||
"setnz %1\n\t"
|
||||
:"=&r" (*Index), "=r" (BitPosition)
|
||||
:"rm" (Mask)
|
||||
:"memory");
|
||||
return BitPosition;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user