diff options
author | Nikita Karetnikov <nikita@karetnikov.org> | 2015-10-31 12:27:54 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-10-31 16:40:38 +0100 |
commit | 8160f42b8dad33e47b4c73ed3f9bf889462e7bfe (patch) | |
tree | 0752990875cffaac175c28b3a761b1509862af4b /libraries/integer-gmp | |
parent | 62f0fbc943307d8522e6c8333caf37c6569ee873 (diff) | |
download | haskell-8160f42b8dad33e47b4c73ed3f9bf889462e7bfe.tar.gz |
Add subWordC# on x86ish
This adds a subWordC# primop which implements subtraction with overflow
reporting.
Reviewers: tibbe, goldfire, rwbarton, bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1334
GHC Trac Issues: #10962
Diffstat (limited to 'libraries/integer-gmp')
-rw-r--r-- | libraries/integer-gmp/src/GHC/Integer/Type.hs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libraries/integer-gmp/src/GHC/Integer/Type.hs b/libraries/integer-gmp/src/GHC/Integer/Type.hs index fd7901a6c9..5bc52539fd 100644 --- a/libraries/integer-gmp/src/GHC/Integer/Type.hs +++ b/libraries/integer-gmp/src/GHC/Integer/Type.hs @@ -1988,13 +1988,6 @@ cmpW# x# y# | True = GT {-# INLINE cmpW# #-} -subWordC# :: Word# -> Word# -> (# Word#, Int# #) -subWordC# x# y# = (# d#, c# #) - where - d# = x# `minusWord#` y# - c# = d# `gtWord#` x# -{-# INLINE subWordC# #-} - bitWord# :: Int# -> Word# bitWord# = uncheckedShiftL# 1## {-# INLINE bitWord# #-} |