diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2019-10-03 00:41:06 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-02 23:59:29 -0500 |
commit | 5f7cb423d7703788014b675af0cbbd611d19310b (patch) | |
tree | 9a53466a09ef023e89dcf3d766620eaf5aed4328 /compiler/prelude | |
parent | 4cbd5b47a00a29b7835710f1b91bb93ac8e3f790 (diff) | |
download | haskell-5f7cb423d7703788014b675af0cbbd611d19310b.tar.gz |
Add `timesInt2#` primop
Diffstat (limited to 'compiler/prelude')
-rw-r--r-- | compiler/prelude/primops.txt.pp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index 076854b4d2..0faf180061 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -251,6 +251,13 @@ primop IntMulOp "*#" with commutable = True fixity = infixl 7 +primop IntMul2Op "timesInt2#" GenPrimOp + Int# -> Int# -> (# Int#, Int#, Int# #) + {Return a triple (isHighNeeded,high,low) where high and low are respectively + the high and low bits of the double-word result. isHighNeeded is a cheap way + to test if the high word is a sign-extension of the low word (isHighNeeded = + 0#) or not (isHighNeeded = 1#).} + primop IntMulMayOfloOp "mulIntMayOflo#" Dyadic Int# -> Int# -> Int# {Return non-zero if there is any possibility that the upper word of a |