Add 'addWordC#' PrimOp
authorSebastian Graf <sebastian.graf@kit.edu>
Sat, 5 May 2018 17:30:32 +0000 (13:30 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 5 May 2018 21:06:35 +0000 (17:06 -0400)
commit6243bba73d14cbee4219a16d45f57d1b254a6456
tree56c4528dd27b7c0634ef3707adb0a47771f62011
parent418881f7181cbfa31c44f0794db65bf00916bde2
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
74 files changed:
compiler/cmm/CmmMachOp.hs
compiler/cmm/PprC.hs
compiler/codeGen/StgCmmPrim.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/SPARC/CodeGen.hs
compiler/nativeGen/X86/CodeGen.hs
compiler/prelude/primops.txt.pp
docs/users_guide/8.6.1-notes.rst
libraries/ghc-compact/ghc-compact.cabal
libraries/ghc-prim/changelog.md
libraries/ghc-prim/ghc-prim.cabal
testsuite/tests/ado/ado004.stderr
testsuite/tests/backpack/should_compile/bkp16.stderr
testsuite/tests/determinism/determ021/determ021.stdout
testsuite/tests/driver/json2.stderr
testsuite/tests/indexed-types/should_compile/T3017.stderr
testsuite/tests/partial-sigs/should_compile/ADT.stderr
testsuite/tests/partial-sigs/should_compile/AddAndOr1.stderr
testsuite/tests/partial-sigs/should_compile/AddAndOr2.stderr
testsuite/tests/partial-sigs/should_compile/AddAndOr3.stderr
testsuite/tests/partial-sigs/should_compile/AddAndOr4.stderr
testsuite/tests/partial-sigs/should_compile/AddAndOr5.stderr
testsuite/tests/partial-sigs/should_compile/AddAndOr6.stderr
testsuite/tests/partial-sigs/should_compile/BoolToBool.stderr
testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/Defaulting1MROn.stderr
testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr
testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
testsuite/tests/partial-sigs/should_compile/Either.stderr
testsuite/tests/partial-sigs/should_compile/EqualityConstraint.stderr
testsuite/tests/partial-sigs/should_compile/Every.stderr
testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr
testsuite/tests/partial-sigs/should_compile/ExpressionSig.stderr
testsuite/tests/partial-sigs/should_compile/ExpressionSigNamed.stderr
testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.stderr
testsuite/tests/partial-sigs/should_compile/ExtraConstraints2.stderr
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
testsuite/tests/partial-sigs/should_compile/ExtraNumAMROff.stderr
testsuite/tests/partial-sigs/should_compile/ExtraNumAMROn.stderr
testsuite/tests/partial-sigs/should_compile/Forall1.stderr
testsuite/tests/partial-sigs/should_compile/GenNamed.stderr
testsuite/tests/partial-sigs/should_compile/HigherRank1.stderr
testsuite/tests/partial-sigs/should_compile/HigherRank2.stderr
testsuite/tests/partial-sigs/should_compile/LocalDefinitionBug.stderr
testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
testsuite/tests/partial-sigs/should_compile/MonoLocalBinds.stderr
testsuite/tests/partial-sigs/should_compile/NamedTyVar.stderr
testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/ParensAroundContext.stderr
testsuite/tests/partial-sigs/should_compile/PatBind.stderr
testsuite/tests/partial-sigs/should_compile/PatBind2.stderr
testsuite/tests/partial-sigs/should_compile/PatternSig.stderr
testsuite/tests/partial-sigs/should_compile/Recursive.stderr
testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcards.stderr
testsuite/tests/partial-sigs/should_compile/ScopedNamedWildcardsGood.stderr
testsuite/tests/partial-sigs/should_compile/ShowNamed.stderr
testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr
testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
testsuite/tests/partial-sigs/should_compile/Uncurry.stderr
testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
testsuite/tests/roles/should_compile/Roles1.stderr
testsuite/tests/roles/should_compile/Roles14.stderr
testsuite/tests/roles/should_compile/Roles2.stderr
testsuite/tests/roles/should_compile/Roles3.stderr
testsuite/tests/roles/should_compile/Roles4.stderr
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/th/TH_Roles2.stderr
testsuite/tests/typecheck/should_compile/T12763.stderr
testsuite/tests/typecheck/should_compile/tc231.stderr