rts: Fix aarch64 implementation of xchg
authorErik de Castro Lopo <erikd@mega-nerd.com>
Thu, 28 May 2015 02:57:28 +0000 (02:57 +0000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 1 Jun 2015 09:40:07 +0000 (19:40 +1000)
commitf6ca6959e54ede0b28735ab7e011c16b3cb172db
treee91c6daabedd093a0229605e6478a589dd682e1a
parentf5b43ce177e40a34afb1913bc0ec866185ed95d7
rts: Fix aarch64 implementation of xchg

In the previous implementation, the `stlxr` instruction clobbered
the value that was supposed to be returned by the the `xchg`
function.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: build on aarch64

Reviewers: austin, bgamari, rwbarton

Subscribers: bgamari, thomie

Differential Revision: https://phabricator.haskell.org/D932
includes/stg/SMP.h