summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-30 12:46:10 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-04 23:45:46 -0400
commit347537a5999622def42da47572ca49580c53f29c (patch)
treed7fde7d62c1c7764b6f785edacbcd84647619204
parent40c81dd297dcfb8259f35372d2367b00e3661603 (diff)
downloadhaskell-347537a5999622def42da47572ca49580c53f29c.tar.gz
compiler: Improve Haddocks of atomic MachOps
-rw-r--r--compiler/GHC/Cmm/MachOp.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/GHC/Cmm/MachOp.hs b/compiler/GHC/Cmm/MachOp.hs
index b5aa278ad7..7004fece51 100644
--- a/compiler/GHC/Cmm/MachOp.hs
+++ b/compiler/GHC/Cmm/MachOp.hs
@@ -669,9 +669,11 @@ data CallishMachOp
| MO_AtomicRMW Width AtomicMachOp
| MO_AtomicRead Width
| MO_AtomicWrite Width
+ -- | Atomic compare-and-swap. Arguments are @[dest, expected, new]@.
+ -- Sequentially consistent.
+ -- Possible future refactoring: should this be an'MO_AtomicRMW' variant?
| MO_Cmpxchg Width
- -- Should be an AtomicRMW variant eventually.
- -- Sequential consistent.
+ -- | Atomic swap. Arguments are @[dest, new]@
| MO_Xchg Width
-- These rts provided functions are special: suspendThread releases the