diff --git a/common/include/intrin_x86.h b/common/include/intrin_x86.h index 8034048193..658ad518d2 100644 --- a/common/include/intrin_x86.h +++ b/common/include/intrin_x86.h @@ -591,7 +591,7 @@ static __inline__ __attribute__((always_inline)) void __addfsdword(const unsigne /*** Bit manipulation ***/ 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; } diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index a213f88633..78c7dfd49a 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -374,7 +374,7 @@ struct aligned_free_second {template void operator()(T& p) {_aligned_fr __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; }