[commit: ghc] master: Add more primops for atomic ops on byte arrays (d8abf85)

git at git.haskell.org git at git.haskell.org
Tue Jun 24 17:47:09 UTC 2014


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

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

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

commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3
Author: Johan Tibell <johan.tibell at gmail.com>
Date:   Mon Jun 9 11:43:21 2014 +0200

    Add more primops for atomic ops on byte arrays
    
    Summary:
    Add more primops for atomic ops on byte arrays
    
    Adds the following primops:
    
     * atomicReadIntArray#
     * atomicWriteIntArray#
     * fetchSubIntArray#
     * fetchOrIntArray#
     * fetchXorIntArray#
     * fetchAndIntArray#
    
    Makes these pre-existing out-of-line primops inline:
    
     * fetchAddIntArray#
     * casIntArray#


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

d8abf85f8ca176854e9d5d0b12371c4bc402aac3
 compiler/cmm/CmmMachOp.hs                          |  19 ++
 compiler/cmm/CmmSink.hs                            |   4 +
 compiler/cmm/PprC.hs                               |   4 +
 compiler/codeGen/StgCmmPrim.hs                     |  94 +++++++
 compiler/llvmGen/Llvm/AbsSyn.hs                    |   7 +
 compiler/llvmGen/Llvm/PpLlvm.hs                    |  18 +-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            |  71 ++++--
 compiler/nativeGen/CPrim.hs                        |  50 +++-
 compiler/nativeGen/PPC/CodeGen.hs                  |   4 +
 compiler/nativeGen/SPARC/CodeGen.hs                |   4 +
 compiler/nativeGen/X86/CodeGen.hs                  |  92 +++++++
 compiler/nativeGen/X86/Instr.hs                    |  38 ++-
 compiler/nativeGen/X86/Ppr.hs                      |   8 +
 compiler/prelude/primops.txt.pp                    |  76 +++++-
 includes/stg/MiscClosures.h                        |   1 -
 libraries/ghc-prim/cbits/atomic.c                  | 280 +++++++++++++++++++++
 libraries/ghc-prim/ghc-prim.cabal                  |   1 +
 rts/Linker.c                                       |   1 -
 rts/PrimOps.cmm                                    |  12 -
 testsuite/tests/concurrent/should_run/.gitignore   |   1 +
 .../tests/concurrent/should_run/AtomicPrimops.hs   | 245 ++++++++++++++++++
 .../concurrent/should_run/AtomicPrimops.stdout     |   7 +
 testsuite/tests/concurrent/should_run/all.T        |   1 +
 23 files changed, 984 insertions(+), 54 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 d8abf85f8ca176854e9d5d0b12371c4bc402aac3


More information about the ghc-commits mailing list