mirror of https://github.com/PCSX2/pcsx2.git
Fix the BitScanForward implementations for x86_64.
This commit is contained in:
parent
80b22ca2be
commit
2a6656050c
|
@ -591,7 +591,7 @@ static __inline__ __attribute__((always_inline)) void __addfsdword(const unsigne
|
||||||
/*** Bit manipulation ***/
|
/*** Bit manipulation ***/
|
||||||
static __inline__ __attribute__((always_inline)) unsigned char _BitScanForward(unsigned long * const Index, const unsigned long Mask)
|
static __inline__ __attribute__((always_inline)) unsigned char _BitScanForward(unsigned long * const Index, const unsigned long Mask)
|
||||||
{
|
{
|
||||||
__asm__("bsfl %[Mask], %[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask));
|
__asm__("bsfl %k[Mask], %k[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask));
|
||||||
return Mask ? 1 : 0;
|
return Mask ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -375,7 +375,7 @@ struct aligned_free_second {template<class T> void operator()(T& p) {_aligned_fr
|
||||||
|
|
||||||
__forceinline unsigned char _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
__forceinline unsigned char _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
||||||
{
|
{
|
||||||
__asm__("bsfl %[Mask], %[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask));
|
__asm__("bsfl %k[Mask], %k[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask));
|
||||||
|
|
||||||
return Mask ? 1 : 0;
|
return Mask ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue