Use MO_Cmpxchg in Primops.cmm instead of ccall cas(..)

Authored by alexbiehl on Aug 1 2016, 3:46 AM.

Description

Use MO_Cmpxchg in Primops.cmm instead of ccall cas(..)

Adjust CmmParse.y to parse the cmpxchg{8, 16, 32, 64} instructions
and use the 32 respectively the 64 bit variant in Primops.cmm. This
effectively eliminates the compare-and-swap ccall to the rts.

Based off the mailing list question from @osa1
(https://mail.haskell.org/pipermail/ghc-devs/2016-July/012506.html).

Reviewers: simonmar, austin, erikd, bgamari, trommler

Reviewed By: erikd, bgamari, trommler

Subscribers: carter, trommler, osa1, thomie

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

Details

Committed
erikdAug 1 2016, 3:46 AM
Pushed
bgamariAug 25 2016, 1:39 PM
Reviewer
erikd
Differential Revision
D2431: Use MO_Cmpxchg in Primops.cmm instead of ccall cas(..)
Parents
rGHCDIFF89ae1e858f6e: Relevant Bindings no longer reports shadowed bindings (fixes #12176)
Branches
Unknown
Tags
Unknown