summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2015-10-30 19:53:52 +0100
committerBen Gamari <ben@smart-cactus.org>2015-10-30 19:54:00 +0100
commit42e85284b7be4aa298cff51119f33a72c0e3bd7a (patch)
tree266fb824f1b648d645a6da9a22734a87855928ab /compiler
parent2624298a0d81e348b879c521b9fae3f389ebab08 (diff)
downloadhaskell-42e85284b7be4aa298cff51119f33a72c0e3bd7a.tar.gz
CmmParse: Expose popcnt operations
Make various population count operations available via C-- syntax under the names %popcnt{8,16,32,64}. Fixes #11037. Reviewers: simonmar, austin, ekmett Reviewed By: austin, ekmett Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1402 GHC Trac Issues: #11037
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cmm/CmmParse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y
index 555aed25df..11e68bd4e1 100644
--- a/compiler/cmm/CmmParse.y
+++ b/compiler/cmm/CmmParse.y
@@ -981,7 +981,12 @@ callishMachOps = listToUFM $
("prefetch0", (,) $ MO_Prefetch_Data 0),
("prefetch1", (,) $ MO_Prefetch_Data 1),
("prefetch2", (,) $ MO_Prefetch_Data 2),
- ("prefetch3", (,) $ MO_Prefetch_Data 3)
+ ("prefetch3", (,) $ MO_Prefetch_Data 3),
+
+ ( "popcnt8", (,) $ MO_PopCnt W8 ),
+ ( "popcnt16", (,) $ MO_PopCnt W16 ),
+ ( "popcnt32", (,) $ MO_PopCnt W32 ),
+ ( "popcnt64", (,) $ MO_PopCnt W64 )
-- ToDo: the rest, maybe
-- edit: which rest?