diff options
author | alexbiehl <alex.biehl@gmail.com> | 2017-10-29 20:47:26 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-10-29 21:51:00 -0400 |
commit | 7673561555ae354fd9eed8de1e57c681906e2d49 (patch) | |
tree | 783602c83122f0567c935d9e6f3c85d0b18649ee /compiler/cmm | |
parent | cecd2f2d708d419878205ddd8b87bba18e6483d9 (diff) | |
download | haskell-7673561555ae354fd9eed8de1e57c681906e2d49.tar.gz |
Turn `compareByteArrays#` out-of-line primop into inline primop
Depends on D4090
Reviewers: austin, bgamari, erikd, simonmar, alexbiehl
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4091
Diffstat (limited to 'compiler/cmm')
-rw-r--r-- | compiler/cmm/CmmMachOp.hs | 3 | ||||
-rw-r--r-- | compiler/cmm/CmmParse.y | 1 | ||||
-rw-r--r-- | compiler/cmm/PprC.hs | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/compiler/cmm/CmmMachOp.hs b/compiler/cmm/CmmMachOp.hs index fba57bed35..fdbfd6e857 100644 --- a/compiler/cmm/CmmMachOp.hs +++ b/compiler/cmm/CmmMachOp.hs @@ -584,6 +584,7 @@ data CallishMachOp | MO_Memcpy Int | MO_Memset Int | MO_Memmove Int + | MO_Memcmp Int | MO_PopCnt Width | MO_Clz Width @@ -616,6 +617,7 @@ callishMachOpHints op = case op of MO_Memcpy _ -> ([], [AddrHint,AddrHint,NoHint]) MO_Memset _ -> ([], [AddrHint,NoHint,NoHint]) MO_Memmove _ -> ([], [AddrHint,AddrHint,NoHint]) + MO_Memcmp _ -> ([], [AddrHint, AddrHint, NoHint]) _ -> ([],[]) -- empty lists indicate NoHint @@ -625,4 +627,5 @@ machOpMemcpyishAlign op = case op of MO_Memcpy align -> Just align MO_Memset align -> Just align MO_Memmove align -> Just align + MO_Memcmp align -> Just align _ -> Nothing diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index 96019d2ff8..7ffb4fbe42 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -994,6 +994,7 @@ callishMachOps = listToUFM $ ( "memcpy", memcpyLikeTweakArgs MO_Memcpy ), ( "memset", memcpyLikeTweakArgs MO_Memset ), ( "memmove", memcpyLikeTweakArgs MO_Memmove ), + ( "memcmp", memcpyLikeTweakArgs MO_Memcmp ), ("prefetch0", (,) $ MO_Prefetch_Data 0), ("prefetch1", (,) $ MO_Prefetch_Data 1), diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index 0fcadc2bec..1ddd1cd266 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -786,6 +786,7 @@ pprCallishMachOp_for_C mop MO_Memcpy _ -> text "memcpy" MO_Memset _ -> text "memset" MO_Memmove _ -> text "memmove" + MO_Memcmp _ -> text "memcmp" (MO_BSwap w) -> ptext (sLit $ bSwapLabel w) (MO_PopCnt w) -> ptext (sLit $ popCntLabel w) (MO_Clz w) -> ptext (sLit $ clzLabel w) |