Commit Graph

9 Commits

Author SHA1 Message Date
Torvald Riegel 969a32ce93 Fix __atomic to not implement atomic loads with CAS.
gcc/
	* builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
	conditional on existance of a fast atomic load.
	* optabs-query.c (can_atomic_load_p): New function.
	* optabs-query.h (can_atomic_load_p): Declare it.
	* optabs.c (expand_atomic_exchange): Always delegate to libatomic if
	no fast atomic load is available for the particular size of access.
	(expand_atomic_compare_and_swap): Likewise.
	(expand_atomic_load): Likewise.
	(expand_atomic_store): Likewise.
	(expand_atomic_fetch_op): Likewise.
	* testsuite/lib/target-supports.exp
	(check_effective_target_sync_int_128): Remove x86 because it provides
	no fast atomic load.
	(check_effective_target_sync_int_128_runtime): Likewise.

libatomic/
	* acinclude.m4: Add #define FAST_ATOMIC_LDST_*.
	* auto-config.h.in: Regenerate.
	* config/x86/host-config.h (FAST_ATOMIC_LDST_16): Define to 0.
	(atomic_compare_exchange_n): New.
	* glfree.c (EXACT, LARGER): Change condition and add comments.

From-SVN: r245098
2017-02-01 17:21:59 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Richard Sandiford 3e6a2e378c Update copyright years in libatomic/
From-SVN: r206291
2014-01-02 22:24:30 +00:00
Uros Bizjak 8b02e720d2 sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions when __TARGET_SSE__ is defined.
libgcc/ChangeLog:

2013-12-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE
	instructions when __TARGET_SSE__ is defined.

libatomic/ChangeLog:

2013-12-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/x86/fenv.c (__atomic_feraiseexcept): Emit SSE
	instructions when __TARGET_SSE__ is defined.

From-SVN: r205811
2013-12-09 18:37:43 +01:00
Uros Bizjak 6fbf987777 fenv.c: New file.
* config/x86/fenv.c: New file.

From-SVN: r204634
2013-11-10 12:45:42 +01:00
Richard Sandiford 69b2c4233b Update copyright years in libatomic.
From-SVN: r195164
2013-01-14 18:16:23 +00:00
Richard Henderson 483104922a Add libatomic as a target library.
From-SVN: r187018
2012-05-01 08:48:28 -07:00