mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:15:59 +00:00
pathc from w3seek : bug 1702 : Fix BitScanReverse()
svn path=/trunk/; revision=23156
This commit is contained in:
parent
55b8810a2b
commit
97f449127c
1 changed files with 7 additions and 7 deletions
|
@ -3818,13 +3818,13 @@ static __inline__ BOOLEAN
|
||||||
BitScanReverse(OUT ULONG *Index,
|
BitScanReverse(OUT ULONG *Index,
|
||||||
IN ULONG Mask)
|
IN ULONG Mask)
|
||||||
{
|
{
|
||||||
LONG OldBit;
|
BOOLEAN BitPosition = 0;
|
||||||
__asm__ __volatile__("bsrl %1,%2\n\t"
|
__asm__ __volatile__("bsrl %2,%0\n\t"
|
||||||
"sbbl %0,%0\n\t"
|
"setnz %1\n\t"
|
||||||
:"=r" (OldBit),"=m" (*Index)
|
:"=&r" (*Index), "=r" (BitPosition)
|
||||||
:"Ir" (Mask)
|
:"rm" (Mask)
|
||||||
: "memory");
|
:"memory");
|
||||||
return OldBit;
|
return BitPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue