summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Always use 'mfence' for nop_full if target CPU supports SSE2 (gcc/x86)add-aarch64-supportIvan Maidanski2013-03-091-3/+2
| | | | | * src/atomic_ops/sysdeps/gcc/x86.h (AO_USE_PENTIUM4_INSTRS): Define if __SSE2__ is defined; update comment (and remove TODO item).
* Fix assembly comment prefix and identify memory clobbers for AArch64Yvan Roux2013-03-091-44/+35
| | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/aarch64.h: Revert comments beginning marker to '//' (since '@' is not supported for A64 assembler). * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_double_load): Add comment about the need for STXP instruction; remove TODO item. * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_double_store): Add comment about absence of "cc" in clobber lists; remove TODO item. * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_double_load, AO_double_load_acquire, AO_double_store, AO_double_store_release, AO_double_compare_and_swap, AO_double_compare_and_swap_acquire, AO_double_compare_and_swap_release): Use Q constraint (instead of "r") for 'addr' argument to instruct the compiler about memory clobbers.
* Use AO_EXPECT_FALSE for AArch64 double_load/storeIvan Maidanski2013-03-051-14/+20
| | | | | | | | | | * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_HAVE_DOUBLE_PTR_STORAGE): Do not check (since defined in standard_ao_double_t.h for AArch64). * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_double_load): Add TODO items. * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_double_load, AO_double_load_acquire, AO_double_store, AO_double_store_release): Use AO_EXPECT_FALSE.
* Workaround missing built-in double-wide primitives for AArch64 in gcc-4.7Yvan Roux2013-03-052-40/+199
| | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_double_load, AO_double_load_acquire, AO_double_store, AO_double_store_release, AO_double_compare_and_swap, AO_double_compare_and_swap_acquire, AO_double_compare_and_swap_release): Define using inline assembly (because GCC 4.7-2013.01 has no support of 16-byte atomic operations). * src/atomic_ops/sysdeps/gcc/generic.h (AO_double_load, AO_double_load_acquire, AO_double_store, AO_double_store_release, AO_double_compare_and_swap): Do not define if the corresponding AO_HAVE_double_X macro is defined.
* gcc/x86.h: Add TODO itemsIvan Maidanski2013-02-281-0/+4
|
* Merge remote-tracking branch 'origin/master' into add-aarch64-supportIvan Maidanski2013-02-286-100/+136
|\
| * Remove improper comment for AO_XSIZE_load_readIvan Maidanski2013-02-282-18/+6
| | | | | | | | | | | | | | | | | | | | * src/atomic_ops/generalize-small.template (AO_XSIZE_load_read): Remove improper comment (because nop barrier type matches that of load primitive). * src/atomic_ops/generalize-small.template (AO_XSIZE_store_write): Reorder AO_HAVE_nop_write and AO_HAVE_XSIZE_store checking (to match that for other primitives in this file). * src/atomic_ops/generalize-small.h: Regenerate.
| * Implement AO_and/or/xor efficiently for ARMIvan Maidanski2013-02-141-0/+57
| | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h (AO_and, AO_or, AO_xor): Implement directly using LDREX/STREX (enabled only if not AO_PREFER_GENERALIZED).
| * Add compile-time assertion for size of 'standard' AO_double_tIvan Maidanski2013-02-141-0/+5
| | | | | | | | | | | | * src/atomic_ops/sysdeps/standard_ao_double_t.h (AO_double_t_size_static_assert): Add compile-time assertion for AO_double_t size.
| * Fix (remove) invalid include of read_ordered.h for ARMIvan Maidanski2013-02-143-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | (fix commit 2df9c1e partially) * src/atomic_ops/sysdeps/gcc/arm.h: Do not include read_ordered.h (because load_acquire should contain a DMB instruction in a multi-core case, new load_acquire/read primitives implementation is generalized using nop_full/read which either contain a DMB instruction, or is just a compiler barrier for uniprocessor). * src/atomic_ops/sysdeps/armcc/arm_v6.h: Likewise. * src/atomic_ops/sysdeps/msftc/arm.h: Likewise.
| * Revert "Fix read_ordered.h inclusion for ARM"Ivan Maidanski2013-02-143-7/+5
| | | | | | | | | | | | (because it makes load_acquire/read incorrect for multi-core ARM) This reverts commit fcc838be49c98486c26738764f895d34de0716be.
| * Implement load/store via simple LDR/STR for ARMv6+ (msftc)Ivan Maidanski2013-02-141-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/msftc/arm.h: Include all_aligned_atomic_load_store.h instead of all_atomic_load_store.h (since unaligned accesses are not guaranteed to be atomic). * src/atomic_ops/sysdeps/msftc/arm.h (AO_load): Remove; include all_aligned_atomic_load_store.h unconditionally instead (thus implementing AO[_char/short]_load/store via simple LDR/STR; add comment about Windows interrupt handlers. * src/atomic_ops/sysdeps/msftc/arm.h: Add TODO item to implement AO_test_and_set_full (for pre-ARMv6).
| * Define AO_nop_full as compiler barrier for pre-ARMv6 single-core caseIvan Maidanski2013-02-142-60/+60
| | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full): Define for pre-ARMv6 as well (as a compiler barrier) if AO_UNIPROCESSOR; refine comment. * src/atomic_ops/sysdeps/msftc/arm.h (AO_nop_full): Likewise. * src/atomic_ops/sysdeps/msftc/arm.h: Eliminate duplicated include of test_and_set_t_is_ao_t.h.
* | Minimize gcc/generic-arithm template by factoring out barriersIvan Maidanski2013-02-283-307/+443
| | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/Makefile.am (atomic_ops/sysdeps/gcc/generic-arithm.h): Iterate over XBAR/XGCCBAR (in addition to XSIZE/XCTYPE). * src/atomic_ops/sysdeps/gcc/generic-arithm.template: Parametrize all primitives with XBAR (replacing AO none/acquire/release/full barriers) and with XGCCBAR (replacing GCC atomic RELAXED/ACQUIRE/RELEASE/SEQ_CST barriers, respectively). * src/atomic_ops/sysdeps/gcc/generic-arithm.h: Regenerate.
* | Implement char/short/int-wide primitives using GCC built-in atomic/syncIvan Maidanski2013-02-285-12/+817
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/Makefile.am (EXTRA_DIST): Add gcc/generic-arithm.template, gcc/generic-small.template entries. * src/Makefile.am (nobase_private_HEADERS): Move gcc/generic-arithm.h, atomic_ops/sysdeps/gcc/generic-small.h to BUILT_SOURCES. * src/Makefile.am (atomic_ops/sysdeps/gcc/generic-arithm.h, atomic_ops/sysdeps/gcc/generic-small.h): New rules (to generate AO_char/short/int_X primitives included from gcc/generic.h file. * src/atomic_ops/sysdeps/gcc/generic-arithm.template: New template file (based on code moved from generic-arithm.h). * src/atomic_ops/sysdeps/gcc/generic-small.template: New template file (based on code moved from generic-small.h). * src/atomic_ops/sysdeps/gcc/generic-arithm.h: Regenerate. * src/atomic_ops/sysdeps/gcc/generic-small.h: Likewise.
* | Move gcc-generic AO_t-wide primitives to generic-small/arithm headersIvan Maidanski2013-02-284-168/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/atomic_ops/sysdeps/gcc/generic-small.h: New file. * src/atomic_ops/sysdeps/gcc/generic-arithm.h: Likewise. * src/atomic_ops/sysdeps/gcc/generic.h: Include generic-small.h file. * src/atomic_ops/sysdeps/gcc/generic.h (AO_load, AO_load_acquire, AO_store, AO_store_release, AO_fetch_compare_and_swap, AO_compare_and_swap): Move to generic-small.h file. * src/atomic_ops/sysdeps/gcc/generic.h: Include generic-arithm.h file unless AO_PREFER_GENERALIZED. * src/atomic_ops/sysdeps/gcc/generic.h (AO_fetch_and_add, AO_fetch_and_add_acquire, AO_fetch_and_add_release, AO_fetch_and_add_full, AO_and, AO_and_acquire, AO_and_release, AO_and_full, AO_or, AO_or_acquire, AO_or_release, AO_or_full, AO_xor, AO_xor_acquire, AO_xor_release, AO_xor_full): Move to generic-arithm.h file. * src/Makefile.am (nobase_private_HEADERS): Add gcc/generic-arithm.h, gcc/generic-small.h entries.
* | Define nop_write as 'dmb st' for AArch64Ivan Maidanski2013-02-282-8/+17
| | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/aarch64.h (AO_nop_write): Define via asm (dmb st) statement unless AO_UNIPROCESSOR (because it seems there is no equivalent definition using compiler __atomic_thread_fence). * src/atomic_ops/sysdeps/gcc/generic.h (AO_nop_write): Do not define if already is.
* | Fix AO_double_t definition for AArch64Ivan Maidanski2013-02-281-0/+2
| | | | | | | | | | * src/atomic_ops/sysdeps/standard_ao_double_t.h (double_ptr_storage): Define explicitly for AArch64 (use __int128 instead of long long).
* | Fix double_compare_and_swap compile-time error in gcc/generic.hYvan Roux2013-02-281-1/+1
| | | | | | | | | | * src/atomic_ops/sysdeps/gcc/generic.h (AO_double_compare_and_swap): Fix access to old_val value.
* | Use __atomic GCC built-in to implement generic double-wide CASIvan Maidanski2013-02-131-3/+6
| | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/generic.h (AO_double_compare_and_swap): Implement using __atomic_compare_exchange_n(__ATOMIC_RELAXED) instead of __sync_bool_compare_and_swap.
* | TODO file: move item about sync-base primitives to aarch64.h and generic.hIvan Maidanski2013-02-133-3/+4
| |
* | Implement double-wide load/store and CAS primitives for AArch64Ivan Maidanski2013-02-092-3/+52
| | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/aarch64.h: Include standard_ao_double_t.h (before inclusion of generic.h). * src/atomic_ops/sysdeps/gcc/generic.h (AO_double_load, AO_double_load_acquire, AO_double_store, AO_double_store_release, AO_double_compare_and_swap): Implement (only if AO_HAVE_DOUBLE_PTR_STORAGE defined).
* | Implement nop_read/write and and/or/xor_acquire/release/full for AArch64Ivan Maidanski2013-02-091-12/+111
| | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/generic.h (AO_nop_read, AO_nop_write, AO_and, AO_and_acquire, AO_and_release, AO_and_full, AO_or, AO_or_acquire, AO_or_release, AO_or_full, AO_xor, AO_xor_acquire, AO_xor_release, AO_xor_full): Implement. * src/atomic_ops/sysdeps/gcc/generic.h (AO_nop_full): Implement using __atomic_thread_fence instead of __sync_synchronize. * src/atomic_ops/sysdeps/gcc/generic.h: Add comment about AO_load_full and AO_store_full; update TODO items.
* | Allow to prefer more generalized primitives in gcc/generic.hIvan Maidanski2013-02-091-58/+62
| | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/generic.h (AO_test_and_set, AO_test_and_set_acquire, AO_test_and_set_release, AO_test_and_set_full, AO_fetch_and_add, AO_fetch_and_add_acquire, AO_fetch_and_add_release, AO_fetch_and_add_full): Do not define if AO_PREFER_GENERALIZED. * src/atomic_ops/sysdeps/gcc/generic.h (AO_compare_and_swap): Do not define if AO_GENERALIZE_ASM_BOOL_CAS.
* | Move intrinsic-based primitives from gcc/aarch64.h to new gcc/generic.hIvan Maidanski2013-02-093-116/+153
| | | | | | | | | | | | | | | | | | | | (code refactoring) * src/Makefile.am (nobase_private_HEADERS): Add generic.h entry. * src/atomic_ops/sysdeps/gcc/aarch64.h: Move all primitives to generic.h; include generic.h file. * src/atomic_ops/sysdeps/gcc/generic.h: New file. * src/atomic_ops/sysdeps/gcc/generic.h (AO_nop_full): Add comment.
* | Fix AO_load_acquire for AArch64Ivan Maidanski2013-02-091-5/+1
| | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/aarch64.h: Add TODO for AO_nop_read; uncomment AO_load_acquire definition and remove include of read_ordered.h file (because AO_load_acquire requires "release" barrier, AO_load_read is defined in generalize-small.h using AO_nop_read).
* | Merge branch 'master' into add-aarch64-supportIvan Maidanski2013-02-0955-4775/+7718
|\ \ | |/
| * Remove load_read, store_write redundant definition from ordered_X.hIvan Maidanski2013-02-066-136/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template (AO_XSIZE_load_read): Remove prototype (since defined by generalize-small.template in the same way). * src/atomic_ops/sysdeps/loadstore/ordered_stores_only.template (AO_XSIZE_store_write): Likewise. * src/atomic_ops/sysdeps/loadstore/ordered_stores_only.template (AO_XSIZE_store_release): Define using AO_nop_write and AO_XSIZE_store directly. * src/atomic_ops/sysdeps/ordered_except_wr.h: Move include of ordered_stores_only.h down to be after AO_nop_write definition. * src/atomic_ops/sysdeps/read_ordered.h: Move include of ordered_loads_only.h down to be after AO_nop_read definition. * src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h: Regenerate. * src/atomic_ops/sysdeps/loadstore/ordered_stores_only.h: Likewise.
| * Revert "Prevent load_acquire redefinition in ordered_loads_only.h"Ivan Maidanski2013-02-052-24/+12
| | | | | | | | | | | | | | (That change is not needed because the file defines really only load_acquire, and load_read is the same as in generalize-small.h) This reverts commit ad464bf64a139cefa8b6f6e77b5f1f5ea1c51519.
| * Merge branch 'add-dbl-load-store'Ivan Maidanski2013-02-0355-4775/+7826
| |\
| | * Add generalized fetch_and_add_acquire/release (for ARMv6+)add-dbl-load-storeIvan Maidanski2013-02-032-0/+90
| | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/generalize-arithm.template (AO_XSIZE_fetch_and_add_acquire, AO_XSIZE_fetch_and_add_release): Add generalized template primitives based on AO_XSIZE_fetch_and_add. * src/atomic_ops/generalize-arithm.h: Regenerate.
| | * Fix unsupported instruction use in char/short_fetch_and_add for ARMv6Ivan Maidanski2013-02-021-74/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h (AO_ARM_HAVE_LDREXBH): Define new macro for ARMv6K/Z+ (excluding ARMv6, ARMv6J, ARMv6T2). * src/atomic_ops/sysdeps/gcc/arm.h (AO_char_store, AO_short_store, AO_char_fetch_and_add, AO_short_fetch_and_add): Define (together with the corresponding AO_HAVE_x macros) only if AO_ARM_HAVE_LDREXBH (since otherwise LDREXB/STREXB, LDREXH/STREXH are not supported by the target processor). * src/atomic_ops/sysdeps/gcc/arm.h: Include char_atomic_store.h and short_atomic_store.h only if AO_HAVE_char_store is not defined (by gcc/arm.h itself).
| | * Implement char/short_fetch_and_add for ARMv6+ (GCC)Ivan Maidanski2013-02-021-13/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h: Include char_atomic_store.h and short_atomic_store.h only if not AO_BROKEN_TASKSWITCH_CLREX. * src/atomic_ops/sysdeps/gcc/arm.h (AO_store): Update comment. * src/atomic_ops/sysdeps/gcc/arm.h (AO_char_store, AO_short_store): Implement using LDREXB/STREXB and LDREXH/STREXH, respectively, if AO_BROKEN_TASKSWITCH_CLREX defined (only if AO_ARM_HAVE_LDREX). * src/atomic_ops/sysdeps/gcc/arm.h (AO_char_fetch_and_add, AO_short_fetch_and_add): Implement (based on using LDREXB/STREXB and LDREXH/STREXH, respectively) if AO_ARM_HAVE_LDREX.
| | * Adjust type of 'flag' and 'tmp' local variables in gcc/arm.hIvan Maidanski2013-02-021-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/atomic_ops/sysdeps/gcc/arm.h (AO_store, AO_fetch_compare_and_swap): Change type of "flag" local variable from AO_t to int (only if AO_BROKEN_TASKSWITCH_CLREX). * src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set, AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1): Change type of "flag" local variable from unsigned long to int. * src/atomic_ops/sysdeps/gcc/arm.h (AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1): Change type of "tmp" local variable from unsigned long to AO_t.
| | * Implement atomic store using direct write by default on ARMv6+Ivan Maidanski2013-01-311-48/+30
| | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h (AO_store): Define only if AO_BROKEN_TASKSWITCH_CLREX, otherwise include atomic_store.h; update and refine comment.
| | * Implement char/short_store primitives at aligned addresses for ARMIvan Maidanski2013-01-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h: Include char_atomic_store.h and short_atomic_store.h if AO_ARM_HAVE_LDREX (after AO_ACCESS_x_CHECK_ALIGNED defined); add comment. * src/atomic_ops/sysdeps/gcc/arm.h: Include all_aligned_atomic_load_store.h instead of all_atomic_load_store.h (only if not AO_ARM_HAVE_LDREX).
| | * .gitignore: Ignore .gch filesIvan Maidanski2013-01-271-0/+1
| | |
| | * Implement double_store for ARMv7 using LDREXD/STREXDIvan Maidanski2013-01-261-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full, AO_nop_write, AO_double_load, AO_double_compare_and_swap): Add comment about missing AO_THUMB_GO_ARM. * src/atomic_ops/sysdeps/gcc/arm.h (AO_double_load): Add comment. * src/atomic_ops/sysdeps/gcc/arm.h (AO_double_store): New primitive (implemented directly using LDREXD/STREXD).
| | * Implement char/short_load primitives for ARMv6+Ivan Maidanski2013-01-262-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/armcc/arm_v6.h: Include all_atomic_only_load.h (with defined AO_ACCESS_CHECK_ALIGNED, AO_ACCESS_short_CHECK_ALIGNED and AO_ACCESS_int_CHECK_ALIGNED). * src/atomic_ops/sysdeps/gcc/arm.h: Likewise. * src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_load, AO_HAVE_load): Remove (since defined by all_atomic_only_load.h). * src/atomic_ops/sysdeps/gcc/arm.h (AO_load, AO_HAVE_load): Likewise. * src/atomic_ops/sysdeps/gcc/arm.h: Adjust atomic_store.h filename in comment.
| | * Prevent load_acquire redefinition in ordered_loads_only.hIvan Maidanski2013-01-262-12/+24
| | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/loadstore/ordered_loads_only.template (AO_XSIZE_load_acquire, AO_HAVE_XSIZE_load_acquire): Do not define if AO_HAVE_XSIZE_load_acquire already defined. * src/atomic_ops/sysdeps/loadstore/ordered_loads_only.h: Regenerate.
| | * Add internal header containing only char/short/int/AO_t atomic loadsIvan Maidanski2013-01-204-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/Makefile.am (nobase_private_HEADERS): Add all_atomic_only_load.h entry. * src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h: Include all_atomic_load_store.h instead of including X_atomic_load.h and X_atomic_store.h directly; add comment for char type. * src/atomic_ops/sysdeps/all_atomic_load_store.h: Include all_atomic_only_load.h instead of including X_atomic_load.h directly. * src/atomic_ops/sysdeps/all_atomic_only_load.h: New file (contains only inclusion of atomic_load.h, char_atomic_load.h, short_atomic_load.h and int_atomic_load.h files.
| | * Replace atomic_load_store.template with atomic_load and atomic_store onesIvan Maidanski2013-01-1715-88/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/Makefile.am (EXTRA_DIST): Replace atomic_load_store.template entry with atomic_load.template and atomic_store.template. * src/Makefile.am (BUILT_SOURCES): Replace atomic_load_store.h, char_atomic_load_store.h, int_atomic_load_store.h, short_atomic_load_store.h entries with atomic_load.h, atomic_store.h, char_atomic_load.h, char_atomic_store.h, int_atomic_load.h, int_atomic_store.h, short_atomic_load.h, short_atomic_store.h, respectively. * src/Makefile.am (atomic_ops/sysdeps/loadstore/atomic_load_store.h, atomic_ops/sysdeps/loadstore/char_atomic_load_store.h, atomic_ops/sysdeps/loadstore/int_atomic_load_store.h, atomic_ops/sysdeps/loadstore/short_atomic_load_store.h): Replace with atomic_ops/sysdeps/loadstore/<T>_atomic_load.h and atomic_ops/sysdeps/loadstore/<T>_atomic_store.h rules. * src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h: Include all <T>_atomic_load.h and <T>_atomic_store.h instead of all removed <T>_atomic_load_store.h files. * src/atomic_ops/sysdeps/all_atomic_load_store.h: Likewise. * src/atomic_ops/sysdeps/gcc/alpha.h: Include atomic_load.h and atomic_store.h instead of removed atomic_load_store.h file. * src/atomic_ops/sysdeps/hpc/hppa.h: Likewise. * src/atomic_ops/sysdeps/loadstore/atomic_load.template: New template file (half of code copied from atomic_load_store.template). * src/atomic_ops/sysdeps/loadstore/atomic_store.template: Likewise. * src/atomic_ops/sysdeps/loadstore/atomic_load_store.template: Remove file. * src/atomic_ops/sysdeps/loadstore/atomic_load_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/char_atomic_load_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/int_atomic_load_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/short_atomic_load_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/atomic_load.h: Regenerate. * src/atomic_ops/sysdeps/loadstore/atomic_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/char_atomic_load.h: Likewise. * src/atomic_ops/sysdeps/loadstore/char_atomic_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/int_atomic_load.h: Likewise. * src/atomic_ops/sysdeps/loadstore/int_atomic_store.h: Likewise. * src/atomic_ops/sysdeps/loadstore/short_atomic_load.h: Likewise. * src/atomic_ops/sysdeps/loadstore/short_atomic_store.h: Likewise.
| | * Fix README regarding _acquire_read barrierIvan Maidanski2013-01-151-4/+2
| | | | | | | | | | | | | | | | | | | | | * doc/README.txt (_acquire_read): Add information about memory barrier (similar as in atomic_ops.h). * doc/README.txt (_release_read): Remove information about non-existing barrier.
| | * Define AO_int_and/or/xor primitives in ao_t_is_int headerIvan Maidanski2013-01-142-49/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/ao_t_is_int.template: Update comment; remove TODO item. * src/atomic_ops/sysdeps/ao_t_is_int.template (AO_int_and_XBAR, AO_int_or_XBAR, AO_int_xor_XBAR): Define template primitive (and define the corresponding AO_HAVE_int_X macro). * src/atomic_ops/sysdeps/ao_t_is_int.h: Regenerate.
| | * Generate ao_t_is_int header from templateIvan Maidanski2013-01-143-96/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/Makefile.am (EXTRA_DIST): Add ao_t_is_int.template entry. * src/Makefile.am (BUILT_SOURCES): Add ao_t_is_int.h entry. * src/Makefile.am (nobase_private_HEADERS): Remove ao_t_is_int.h entry (since added to BUILT_SOURCES). * src/Makefile.am (atomic_ops/sysdeps/ao_t_is_int.h): New rule (to generate the header from ao_t_is_int.template substituting XBAR parameter with the corresponding barrier type). * src/atomic_ops/sysdeps/ao_t_is_int.h: Regenerate.
| | * Fix a typo in ao_t_is_int.h commentIvan Maidanski2013-01-141-1/+1
| | | | | | | | | | | | * src/atomic_ops/sysdeps/ao_t_is_int.h: Fix a typo in comment.
| | * Fix return type of AO_int_X primitives defined in ao_t_is_int headerIvan Maidanski2013-01-131-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/ao_t_is_int.h (AO_int_fetch_compare_and_swap_full, AO_int_fetch_compare_and_swap_acquire, AO_int_fetch_compare_and_swap_release, AO_int_fetch_compare_and_swap_write, AO_int_fetch_compare_and_swap_read, AO_int_fetch_compare_and_swap, AO_int_load_acquire, AO_int_fetch_and_add_full, AO_int_fetch_and_add1_acquire, AO_int_fetch_and_add1_release, AO_int_fetch_and_sub1_acquire, AO_int_fetch_and_sub1_release): Cast result to unsigned int instead of signed int.
| | * Fix ordered_except_wr header inclusion for s390Ivan Maidanski2013-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/gcc/s390.h: Move include of ordered_except_wr.h down to be after all_aligned_atomic_load_store.h inclusion (since the latter defines AO_X_load/store primitives used by the former header).
| | * Fix read_ordered.h inclusion for ARMIvan Maidanski2013-01-133-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | * src/atomic_ops/sysdeps/armcc/arm_v6.h: Move include of read_ordered.h down to the end of the file to be after AO_load/store definition (since read_ordered.h depends on these primitives). * src/atomic_ops/sysdeps/gcc/arm.h: Likewise. * src/atomic_ops/sysdeps/msftc/arm.h: Likewise.
| | * Remove AO_store_full from msftc/arm.h in favor of generalized primitiveIvan Maidanski2013-01-131-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | (code refactoring) * src/atomic_ops/sysdeps/msftc/arm.h (AO_store_full): Remove since similar definition exists in generalize-small.h. * src/atomic_ops/sysdeps/msftc/arm.h: Add TODO item for AO_store().