[ros-diffs] [fireball] 37543: Dmitry Gorbachev - Fix an issue with choosing nonexistent x86 registers %sil/%dil, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153 for more details. - Add "memory" to _InterlockedAddLargeStatistic(). "In Visual C++ 2005, this function behaves as a read-write barrier." -- MSDN library. - Use "+m" instead of "=m". See issue #3772 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Sat Nov 22 09:32:17 CET 2008


Author: fireball
Date: Sat Nov 22 02:32:15 2008
New Revision: 37543

URL: http://svn.reactos.org/svn/reactos?rev=37543&view=rev
Log:
Dmitry Gorbachev
- Fix an issue with choosing nonexistent x86 registers %sil/%dil, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153 for more details.
- Add "memory" to _InterlockedAddLargeStatistic(). "In Visual C++ 2005, this function behaves as a read-write barrier." -- MSDN library.
- Use "+m" instead of "=m".

See issue #3772 for more details.

Modified:
    trunk/reactos/include/psdk/intrin_x86.h

Modified: trunk/reactos/include/psdk/intrin_x86.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin_x86.h?rev=37543&r1=37542&r2=37543&view=diff
==============================================================================
--- trunk/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/intrin_x86.h [iso-8859-1] Sat Nov 22 02:32:15 2008
@@ -457,8 +457,9 @@
 		"jae LABEL%=;"
 		"lock; adc $0, %[Hi32];"
 		"LABEL%=:;" :
-		[Lo32] "=m" (*((volatile long *)(Addend) + 0)), [Hi32] "=m" (*((volatile long *)(Addend) + 1)) :
-		[Value] "ir" (Value)
+		[Lo32] "+m" (*((volatile long *)(Addend) + 0)), [Hi32] "+m" (*((volatile long *)(Addend) + 1)) :
+		[Value] "ir" (Value) :
+		"memory"
 	);
 
 	return Value;
@@ -499,7 +500,7 @@
 static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset(volatile long * a, const long b)
 {
 	unsigned char retval;
-	__asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
+	__asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
 	return retval;
 }
 
@@ -515,7 +516,7 @@
 static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b)
 {
 	unsigned char retval;
-	__asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
+	__asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=q" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory");
 	return retval;
 }
 



More information about the Ros-diffs mailing list