From: <se...@us...> - 2013-03-21 08:12:17
|
Revision: 5681 http://mingw-w64.svn.sourceforge.net/mingw-w64/?rev=5681&view=rev Author: sezero Date: 2013-03-21 08:12:09 +0000 (Thu, 21 Mar 2013) Log Message: ----------- Merge from trunk r5679 (Fix wrong code-bug.) Revision Links: -------------- http://mingw-w64.svn.sourceforge.net/mingw-w64/?rev=5679&view=rev Modified Paths: -------------- stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd.c stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd64.c stable/v2.x/mingw-w64-crt/intrincs/bitscanrev.c stable/v2.x/mingw-w64-crt/intrincs/bitscanrev64.c stable/v2.x/mingw-w64-crt/revstamp.h stable/v2.x/mingw-w64-headers/include/winnt.h Modified: stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd.c =================================================================== --- stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd.c 2013-03-21 08:11:36 UTC (rev 5680) +++ stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd.c 2013-03-21 08:12:09 UTC (rev 5681) @@ -2,7 +2,9 @@ unsigned char _BitScanForward(unsigned long *Index, unsigned long Mask) { - __asm__ __volatile__("bsfl %1,%0" : "=r" (Mask),"=m" ((*(volatile long *)Index))); + unsigned long n; + __asm__ __volatile__("bsfl %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = n; return (Mask != 0); } Modified: stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd64.c =================================================================== --- stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd64.c 2013-03-21 08:11:36 UTC (rev 5680) +++ stable/v2.x/mingw-w64-crt/intrincs/bitscanfwd64.c 2013-03-21 08:12:09 UTC (rev 5681) @@ -2,7 +2,9 @@ unsigned char _BitScanForward64(unsigned long *Index, unsigned __int64 Mask) { - __asm__ __volatile__("bsfq %1,%0" : "=r" (Mask),"=m" ((*(volatile long long *)Index))); + unsigned __int64 n; + __asm__ __volatile__("bsfq %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = (unsigned long) n; return (Mask != 0); } Modified: stable/v2.x/mingw-w64-crt/intrincs/bitscanrev.c =================================================================== --- stable/v2.x/mingw-w64-crt/intrincs/bitscanrev.c 2013-03-21 08:11:36 UTC (rev 5680) +++ stable/v2.x/mingw-w64-crt/intrincs/bitscanrev.c 2013-03-21 08:12:09 UTC (rev 5681) @@ -2,7 +2,9 @@ unsigned char _BitScanReverse(unsigned long *Index, unsigned long Mask) { - __asm__ __volatile__("bsrl %1,%0" : "=r" (Mask),"=m" ((*(volatile long *)Index))); + unsigned long n; + __asm__ __volatile__("bsrl %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = n; return (Mask != 0); } Modified: stable/v2.x/mingw-w64-crt/intrincs/bitscanrev64.c =================================================================== --- stable/v2.x/mingw-w64-crt/intrincs/bitscanrev64.c 2013-03-21 08:11:36 UTC (rev 5680) +++ stable/v2.x/mingw-w64-crt/intrincs/bitscanrev64.c 2013-03-21 08:12:09 UTC (rev 5681) @@ -2,7 +2,9 @@ unsigned char _BitScanReverse64(unsigned long *Index, unsigned __int64 Mask) { - __asm__ __volatile__("bsrq %1,%0" : "=r" (Mask),"=m" ((*(volatile long long *)Index))); + unsigned __int64 n; + __asm__ __volatile__("bsrq %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = (unsigned long) n; return (Mask != 0); } Modified: stable/v2.x/mingw-w64-crt/revstamp.h =================================================================== --- stable/v2.x/mingw-w64-crt/revstamp.h 2013-03-21 08:11:36 UTC (rev 5680) +++ stable/v2.x/mingw-w64-crt/revstamp.h 2013-03-21 08:12:09 UTC (rev 5681) @@ -1,4 +1,4 @@ /* Do not edit. Autogenerated. */ -#define __MINGW_W64_REV "5652" -#define __MINGW_W64_REV_STAMP "2013-03-14" +#define __MINGW_W64_REV "5681" +#define __MINGW_W64_REV_STAMP "2013-03-21" Modified: stable/v2.x/mingw-w64-headers/include/winnt.h =================================================================== --- stable/v2.x/mingw-w64-headers/include/winnt.h 2013-03-21 08:11:36 UTC (rev 5680) +++ stable/v2.x/mingw-w64-headers/include/winnt.h 2013-03-21 08:12:09 UTC (rev 5681) @@ -1241,19 +1241,27 @@ #ifndef __CRT__NO_INLINE __CRT_INLINE BOOLEAN _BitScanForward(DWORD *Index,DWORD Mask) { - __asm__ __volatile__("bsfl %1,%0" : "=r" (Mask),"=m" ((*(volatile long *)Index))); + DWORD n; + __asm__ __volatile__("bsfl %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = n; return Mask!=0; } __CRT_INLINE BOOLEAN _BitScanReverse(DWORD *Index,DWORD Mask) { - __asm__ __volatile__("bsrl %1,%0" : "=r" (Mask),"=m" ((*(volatile long *)Index))); + DWORD n; + __asm__ __volatile__("bsrl %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = n; return Mask!=0; } __CRT_INLINE BOOLEAN _BitScanForward64(DWORD *Index,DWORD64 Mask) { - __asm__ __volatile__("bsfq %1,%0" : "=r" (Mask),"=m" ((*(volatile LONG64 *)Index))); + DWORD64 n; + __asm__ __volatile__("bsfq %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = (DWORD) n; return Mask!=0; } __CRT_INLINE BOOLEAN _BitScanReverse64(DWORD *Index,DWORD64 Mask) { - __asm__ __volatile__("bsrq %1,%0" : "=r" (Mask),"=m" ((*(volatile LONG64 *)Index))); + DWORD64 n; + __asm__ __volatile__("bsrq %0,%1" : "+r" (Mask),"=rm" (n) : : "memory"); + *Index = (DWORD) n; return Mask!=0; } #endif /* !__CRT__NO_INLINE */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |