[commit: ghc] master: RTS SMP: Use compiler built-ins on all platforms. (eda73a3)

git at git.haskell.org git at git.haskell.org
Sat Jun 4 07:32:58 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/eda73a3ad3fdd98cf877b25c3c984c6e1b2217fc/ghc

>---------------------------------------------------------------

commit eda73a3ad3fdd98cf877b25c3c984c6e1b2217fc
Author: Peter Trommler <ptrommler at acm.org>
Date:   Fri Jun 3 22:22:23 2016 +0200

    RTS SMP: Use compiler built-ins on all platforms.
    
    Use C compiler builtins for atomic SMP primitives. This saves a lot
    of CPP ifdefs.
    
    Add test for atomic xchg:
    Test if __sync_lock_test_and_set() builtin stores the second argument.
    The gcc manual says the actual value stored is implementation defined.
    
    Test Plan: validate and eyeball generated assembler code
    
    Reviewers: kgardas, simonmar, hvr, bgamari, austin, erikd
    
    Reviewed By: simonmar
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2233


>---------------------------------------------------------------

eda73a3ad3fdd98cf877b25c3c984c6e1b2217fc
 includes/stg/SMP.h                                | 189 +++-------------------
 testsuite/tests/rts/all.T                         |   2 +
 testsuite/tests/rts/{atomicinc.c => atomicxchg.c} |   8 +-
 3 files changed, 27 insertions(+), 172 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc eda73a3ad3fdd98cf877b25c3c984c6e1b2217fc


More information about the ghc-commits mailing list