[commit: ghc] master: Fix signature of atomic builtins (e3d2bab)

git at git.haskell.org git at git.haskell.org
Fri Oct 2 21:03:05 UTC 2015


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

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

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

commit e3d2bab86fc89113f8ee65800fdfac81d8d54851
Author: Andreas Schwab <schwab at suse.de>
Date:   Fri Oct 2 23:03:12 2015 +0200

    Fix signature of atomic builtins
    
    This patch is due to Andreas Schwab.
    
    This fixes #10926, which reports (on AArch64) errors of the form,
    
    ```
    /tmp/ghc1492_0/ghc_1.hc:2844:25: warning: passing argument 1 of
    'hs_atomic_xor64' makes pointer from integer without a cast
    [-Wint-conversion]
         _c1Ho = hs_atomic_xor64((*Sp) + (((Sp[1]) << 0x3UL) + 0x10UL), Sp[2]);
                                 ^
    
    In file included from
    /home/abuild/rpmbuild/BUILD/ghc-7.10.2/includes/Stg.h:273:0: 0,
                     from /tmp/ghc1492_0/ghc_1.hc:3:
    
    /home/abuild/rpmbuild/BUILD/ghc-7.10.2/includes/stg/Prim.h:41:11:
         note: expected 'volatile StgWord64 *
               {aka volatile long unsigned int *}'
               but argument is of type 'long unsigned int'
         StgWord64 hs_atomic_xor64(volatile StgWord64 *x, StgWord64 val);
                   ^
    ```
    
    Test Plan: Validate
    
    Reviewers: austin, simonmar
    
    Reviewed By: simonmar
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1300
    
    GHC Trac Issues: #10926


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

e3d2bab86fc89113f8ee65800fdfac81d8d54851
 includes/stg/Prim.h               |  72 ++++++------
 libraries/ghc-prim/cbits/atomic.c | 224 +++++++++++++++++++-------------------
 2 files changed, 148 insertions(+), 148 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 e3d2bab86fc89113f8ee65800fdfac81d8d54851


More information about the ghc-commits mailing list