sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \
atomic_ops/sysdeps/loadstore/ordered_stores_only.template
sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
atomic_ops/sysdeps/loadstore/acquire_release_volatile.h: \
atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
#include "../all_aligned_atomic_load_store.h"
-/* Real X86 implementations, except for some old 32-bit WinChips, */
-/* appear to enforce ordering between memory operations, EXCEPT that */
-/* a later read can pass earlier writes, presumably due to the visible */
-/* presence of store buffers. */
-/* We ignore both the WinChips and the fact that the official specs */
-/* seem to be much weaker (and arguably too weak to be usable). */
-
-#include "../ordered_except_wr.h"
-
#include "../test_and_set_t_is_char.h"
#if defined(__x86_64__) && !defined(AO_USE_PENTIUM4_INSTRS)
# endif /* AO_WEAK_DOUBLE_CAS_EMULATION && !AO_CMPXCHG16B_AVAILABLE */
#endif /* x86_64 && !ILP32 */
+
+/* Real X86 implementations, except for some old 32-bit WinChips, */
+/* appear to enforce ordering between memory operations, EXCEPT that */
+/* a later read can pass earlier writes, presumably due to the visible */
+/* presence of store buffers. */
+/* We ignore both the WinChips and the fact that the official specs */
+/* seem to be much weaker (and arguably too weak to be usable). */
+#include "../ordered_except_wr.h"
# define AO_load_acquire(addr) AO_load_read(addr)
# define AO_HAVE_load_acquire
#endif /* AO_HAVE_load */
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifdef AO_HAVE_double_load
+ AO_INLINE AO_double_t
+ AO_double_load_read(const volatile AO_double_t *addr)
+ {
+ AO_double_t result = AO_double_load(addr);
+
+ AO_compiler_barrier();
+ return result;
+ }
+# define AO_HAVE_double_load_read
+
+# define AO_double_load_acquire(addr) AO_double_load_read(addr)
+# define AO_HAVE_double_load_acquire
+#endif /* AO_HAVE_double_load */
# define AO_store_release(addr, val) AO_store_write(addr, val)
# define AO_HAVE_store_release
#endif /* AO_HAVE_store */
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#if defined(AO_HAVE_double_store)
+ AO_INLINE void
+ AO_double_store_write(volatile AO_double_t *addr, AO_double_t val)
+ {
+ AO_compiler_barrier();
+ AO_double_store(addr, val);
+ }
+# define AO_HAVE_double_store_write
+
+# define AO_double_store_release(addr, val) AO_double_store_write(addr, val)
+# define AO_HAVE_double_store_release
+#endif /* AO_HAVE_double_store */
#include "../all_aligned_atomic_load_store.h"
-/* Real X86 implementations, except for some old WinChips, appear */
-/* to enforce ordering between memory operations, EXCEPT that a later */
-/* read can pass earlier writes, presumably due to the visible */
-/* presence of store buffers. */
-/* We ignore both the WinChips, and the fact that the official specs */
-/* seem to be much weaker (and arguably too weak to be usable). */
-
-#include "../ordered_except_wr.h"
-
#include "../test_and_set_t_is_char.h"
#if defined(AO_ASSUME_VISTA) && !defined(AO_ASSUME_WINDOWS98)
#endif /* AO_ASSUME_VISTA */
#define AO_T_IS_INT
+
+/* Real X86 implementations, except for some old WinChips, appear */
+/* to enforce ordering between memory operations, EXCEPT that a later */
+/* read can pass earlier writes, presumably due to the visible */
+/* presence of store buffers. */
+/* We ignore both the WinChips, and the fact that the official specs */
+/* seem to be much weaker (and arguably too weak to be usable). */
+#include "../ordered_except_wr.h"
#include "../all_aligned_atomic_load_store.h"
-/* Real X86 implementations, except for some old 32-bit WinChips, */
-/* appear to enforce ordering between memory operations, EXCEPT that */
-/* a later read can pass earlier writes, presumably due to the visible */
-/* presence of store buffers. */
-/* We ignore both the WinChips and the fact that the official specs */
-/* seem to be much weaker (and arguably too weak to be usable). */
-
-#include "../ordered_except_wr.h"
-
#include "../test_and_set_t_is_char.h"
#if !defined(AO_USE_PENTIUM4_INSTRS) && !defined(__i386)
# endif /* !AO_CMPXCHG16B_AVAILABLE */
#endif /* x64 */
+
+/* Real X86 implementations, except for some old 32-bit WinChips, */
+/* appear to enforce ordering between memory operations, EXCEPT that */
+/* a later read can pass earlier writes, presumably due to the visible */
+/* presence of store buffers. */
+/* We ignore both the WinChips and the fact that the official specs */
+/* seem to be much weaker (and arguably too weak to be usable). */
+#include "../ordered_except_wr.h"