diff options
author | Alexandre <alexandrer_b@outlook.com> | 2019-03-28 16:21:35 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-01 03:32:28 -0400 |
commit | 33173a51c77d9960d5009576ad9b67b646dfda3c (patch) | |
tree | e9a1e709cefdfdb65516323ed40fbcf3bb8cd0e4 /compiler/cmm | |
parent | 6f7115dfd4fbb439a309a8381c4d02c450170cdc (diff) | |
download | haskell-33173a51c77d9960d5009576ad9b67b646dfda3c.tar.gz |
Add support for bitreverse primop
This commit includes the necessary changes in code and
documentation to support a primop that reverses a word's
bits. It also includes a test.
Diffstat (limited to 'compiler/cmm')
-rw-r--r-- | compiler/cmm/CmmMachOp.hs | 1 | ||||
-rw-r--r-- | compiler/cmm/PprC.hs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/cmm/CmmMachOp.hs b/compiler/cmm/CmmMachOp.hs index 1441ecaa0f..7cd5c1bc20 100644 --- a/compiler/cmm/CmmMachOp.hs +++ b/compiler/cmm/CmmMachOp.hs @@ -617,6 +617,7 @@ data CallishMachOp | MO_Ctz Width | MO_BSwap Width + | MO_BRev Width -- Atomic read-modify-write. | MO_AtomicRMW Width AtomicMachOp diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index c8b9ef76e2..822de431a4 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -814,6 +814,7 @@ pprCallishMachOp_for_C mop MO_Memmove _ -> text "memmove" MO_Memcmp _ -> text "memcmp" (MO_BSwap w) -> ptext (sLit $ bSwapLabel w) + (MO_BRev w) -> ptext (sLit $ bRevLabel w) (MO_PopCnt w) -> ptext (sLit $ popCntLabel w) (MO_Pext w) -> ptext (sLit $ pextLabel w) (MO_Pdep w) -> ptext (sLit $ pdepLabel w) |