PPC: Implement SMP primitives using gcc built-ins
authorPeter Trommler <ptrommler@acm.org>
Mon, 16 May 2016 13:19:09 +0000 (15:19 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 16 May 2016 13:21:10 +0000 (15:21 +0200)
commit563a4857abcee4a6e43c68323274309c58f42aa0
tree165b86961df9d70d8aa0c3fb2741cc210d8c1ffb
parent2dbdc79bb9e2760394ebfe630908813b630146c7
PPC: Implement SMP primitives using gcc built-ins

The SMP primitives were missing appropriate memory barriers
(sync, isync instructions) on all PowerPCs.

Use the built-ins _sync_* provided by gcc and clang. This
reduces code size significantly.

Remove broken mark for concprog001 on powerpc64. The referenced
ticket number (11259) was wrong.

Test Plan: validate on powerpc and ARM

Reviewers: erikd, austin, simonmar, bgamari, hvr

Reviewed By: bgamari, hvr

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2225

GHC Trac Issues: #12070
includes/stg/SMP.h
testsuite/tests/concurrent/prog001/all.T