+2004-12-03 Richard Henderson <rth@redhat.com>
+
+ * config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
+ Split in-out memory constraints.
+
2004-09-30 Release Manager
* GCC 3.3.5 Released.
// Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
{
register _Atomic_word __result;
__asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
- : "=r" (__result), "+m" (*__mem)
- : "0" (__val)
+ : "=r" (__result), "=m" (*__mem)
+ : "0" (__val), "m"(*__mem)
: "memory");
return __result;
}
__atomic_add (volatile _Atomic_word* __mem, int __val)
{
__asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
- : "+m" (*__mem) : "ir" (__val) : "memory");
+ : "=m" (*__mem)
+ : "ir" (__val), "m"(*__mem)
+ : "memory");
}
#endif /* atomicity.h */