diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2018-05-05 13:30:32 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-05-05 17:06:35 -0400 |
commit | 6243bba73d14cbee4219a16d45f57d1b254a6456 (patch) | |
tree | 56c4528dd27b7c0634ef3707adb0a47771f62011 /compiler/cmm | |
parent | 418881f7181cbfa31c44f0794db65bf00916bde2 (diff) | |
download | haskell-6243bba73d14cbee4219a16d45f57d1b254a6456.tar.gz |
Add 'addWordC#' PrimOp
This is mostly for congruence with 'subWordC#' and '{add,sub}IntC#'.
I found 'plusWord2#' while implementing this, which both lacks
documentation and has a slightly different specification than
'addWordC#', which means the generic implementation is unnecessarily
complex.
While I was at it, I also added lacking meta-information on PrimOps
and refactored 'subWordC#'s generic implementation to be branchless.
Reviewers: bgamari, simonmar, jrtc27, dfeuer
Reviewed By: bgamari, dfeuer
Subscribers: dfeuer, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4592
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 9203911141..15a5827643 100644 --- a/compiler/cmm/CmmMachOp.hs +++ b/compiler/cmm/CmmMachOp.hs @@ -556,6 +556,7 @@ data CallishMachOp | MO_U_QuotRem Width | MO_U_QuotRem2 Width | MO_Add2 Width + | MO_AddWordC Width | MO_SubWordC Width | MO_AddIntC Width | MO_SubIntC Width diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index 76e4d4cb94..1e50c8591b 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -803,6 +803,7 @@ pprCallishMachOp_for_C mop MO_U_QuotRem {} -> unsupported MO_U_QuotRem2 {} -> unsupported MO_Add2 {} -> unsupported + MO_AddWordC {} -> unsupported MO_SubWordC {} -> unsupported MO_AddIntC {} -> unsupported MO_SubIntC {} -> unsupported |