Skip to content
Snippets Groups Projects
  1. Jan 04, 2021
  2. Sep 11, 2020
    • Tom de Vries's avatar
      [libatomic] Add nvptx support · 15545563
      Tom de Vries authored
      Add nvptx support to libatomic.
      
      Given that atomic_test_and_set is not implemented for nvptx (PR96964), the
      compiler translates __atomic_test_and_set falling back onto the "Failing all
      else, assume a single threaded environment and simply perform the operation"
      case in expand_atomic_test_and_set, so it doesn't map onto an actual atomic
      operation.
      
      Still, that counts as supported for the configure test of libatomic, so we
      end up with HAVE_ATOMIC_TAS_1/2/4/8/16 == 1, and the corresponding
      __atomic_test_and_set_1/2/4/8/16 in libatomic all using that non-atomic
      implementation.
      
      Fix this by adding an atomic_test_and_set expansion for nvptx, that uses
      libatomics __atomic_test_and_set_1.
      
      This again makes the configure tests for HAVE_ATOMIC_TAS_1/2/4/8/16 fail, so
      instead we use this case in tas_n.c:
      ...
      /* If this type is smaller than word-sized, fall back to a word-sized
         compare-and-swap loop.  */
      bool
      SIZE(libat_test_and_set) (UTYPE *mptr, int smodel)
      ...
      which for __atomic_test_and_set_8 uses INVERT_MASK_8.
      
      Add INVERT_MASK_8 in libatomic_i.h, as well as MASK_8.
      
      Tested libatomic testsuite on nvptx.
      
      gcc/ChangeLog:
      
      	PR target/96964
      	* config/nvptx/nvptx.md (define_expand "atomic_test_and_set"): New
      	expansion.
      
      libatomic/ChangeLog:
      
      	PR target/96898
      	* configure.tgt: Add nvptx.
      	* libatomic_i.h (MASK_8, INVERT_MASK_8): New macro definition.
      	* config/nvptx/host-config.h: New file.
      	* config/nvptx/lock.c: New file.
      15545563
  3. Jan 01, 2020
  4. Jan 01, 2019
  5. Jan 03, 2018
  6. Dec 05, 2017
    • Steve Ellcey's avatar
      Makefile.am (ARCH_AARCH64_LINUX): Add IFUNC_OPTIONS and libatomic_la_LIBADD. · 141abc6f
      Steve Ellcey authored
      2017-12-04  Steve Ellcey  <sellcey@cavium.com>
      
      	* Makefile.am (ARCH_AARCH64_LINUX): Add IFUNC_OPTIONS and
      	libatomic_la_LIBADD.
      	* config/linux/aarch64/host-config.h: New file.
      	* configure.ac (IFUNC_RESOLVER_ARGS): Define.
      	(ARCH_AARCH64_LINUX): New conditional for IFUNC builds.
      	* configure.tgt (aarch64): Set ARCH and try_ifunc.
      	(aarch64*-*-linux*) Update config_path.
      	(aarch64*-*-linux*) Set IFUNC_RESOLVER_ARGS.
      	* libatomic_i.h (GEN_SELECTOR): Add IFUNC_RESOLVER_ARGS argument.
      	* Makefile.in: Regenerate.
      	* auto-config.h.in: Regenerate.
      	* configure: Regenerate.
      
      From-SVN: r255399
      141abc6f
  7. Oct 02, 2017
    • Martin Sebor's avatar
      Clean up more fallout from r252976. · bc437a56
      Martin Sebor authored
      libatomic/ChangeLog:
      2017-10-02  Martin Sebor  <msebor@redhat.com>
      
      	PR c/81854
      	* acinclude.m4 (LIBAT_CHECK_IFUNC): Have ifunc resolver return
      	a function pointer rather than void* to avoid GCC 8 warnings.
      	* configure: Regenerate.
      	* libatomic_i.h: Declare ifunc resolvers to return function
      	pointers rather than void*.
      
      From-SVN: r253372
      bc437a56
  8. Jan 01, 2017
  9. Jan 04, 2016
  10. Jan 05, 2015
  11. Jan 02, 2014
  12. Jan 14, 2013
  13. May 01, 2012
Loading