Update source-repository in the .cabal file to point to the git repo
[ghc-prim.git] / GHC / IntWord64.hs
1 {-# OPTIONS_GHC -XNoImplicitPrelude #-}
2 {-# OPTIONS_HADDOCK hide #-}
3 -----------------------------------------------------------------------------
4 -- |
5 -- Module      :  GHC.IntWord64
6 -- Copyright   :  (c) The University of Glasgow, 1997-2008
7 -- License     :  see libraries/ghc-prim/LICENSE
8 --
9 -- Maintainer  :  cvs-ghc@haskell.org
10 -- Stability   :  internal
11 -- Portability :  non-portable (GHC Extensions)
12 --
13 -- Primitive operations on Int64# and Word64# on platforms where
14 -- WORD_SIZE_IN_BITS < 64.
15 --
16 -----------------------------------------------------------------------------
17
18 #include "MachDeps.h"
19
20 -- #hide
21 module GHC.IntWord64 (
22 #if WORD_SIZE_IN_BITS < 64
23     Int64#, Word64#, module GHC.IntWord64
24 #endif
25  ) where
26
27 #if WORD_SIZE_IN_BITS < 64
28 import GHC.Prim
29 import GHC.Types
30
31 foreign import ccall unsafe "hs_eqWord64"    eqWord64#      :: Word64# -> Word64# -> Bool
32 foreign import ccall unsafe "hs_neWord64"    neWord64#      :: Word64# -> Word64# -> Bool
33 foreign import ccall unsafe "hs_ltWord64"    ltWord64#      :: Word64# -> Word64# -> Bool
34 foreign import ccall unsafe "hs_leWord64"    leWord64#      :: Word64# -> Word64# -> Bool
35 foreign import ccall unsafe "hs_gtWord64"    gtWord64#      :: Word64# -> Word64# -> Bool
36 foreign import ccall unsafe "hs_geWord64"    geWord64#      :: Word64# -> Word64# -> Bool
37
38 foreign import ccall unsafe "hs_eqInt64"     eqInt64#       :: Int64# -> Int64# -> Bool
39 foreign import ccall unsafe "hs_neInt64"     neInt64#       :: Int64# -> Int64# -> Bool
40 foreign import ccall unsafe "hs_ltInt64"     ltInt64#       :: Int64# -> Int64# -> Bool
41 foreign import ccall unsafe "hs_leInt64"     leInt64#       :: Int64# -> Int64# -> Bool
42 foreign import ccall unsafe "hs_gtInt64"     gtInt64#       :: Int64# -> Int64# -> Bool
43 foreign import ccall unsafe "hs_geInt64"     geInt64#       :: Int64# -> Int64# -> Bool
44 foreign import ccall unsafe "hs_quotInt64"   quotInt64#     :: Int64# -> Int64# -> Int64#
45 foreign import ccall unsafe "hs_remInt64"    remInt64#      :: Int64# -> Int64# -> Int64#
46
47 foreign import ccall unsafe "hs_plusInt64"   plusInt64#     :: Int64# -> Int64# -> Int64#
48 foreign import ccall unsafe "hs_minusInt64"  minusInt64#    :: Int64# -> Int64# -> Int64#
49 foreign import ccall unsafe "hs_timesInt64"  timesInt64#    :: Int64# -> Int64# -> Int64#
50 foreign import ccall unsafe "hs_negateInt64" negateInt64#   :: Int64# -> Int64#
51 foreign import ccall unsafe "hs_quotWord64"  quotWord64#    :: Word64# -> Word64# -> Word64#
52 foreign import ccall unsafe "hs_remWord64"   remWord64#     :: Word64# -> Word64# -> Word64#
53
54 foreign import ccall unsafe "hs_and64"       and64#         :: Word64# -> Word64# -> Word64#
55 foreign import ccall unsafe "hs_or64"        or64#          :: Word64# -> Word64# -> Word64#
56 foreign import ccall unsafe "hs_xor64"       xor64#         :: Word64# -> Word64# -> Word64#
57 foreign import ccall unsafe "hs_not64"       not64#         :: Word64# -> Word64#
58
59 foreign import ccall unsafe "hs_uncheckedShiftL64"   uncheckedShiftL64#   :: Word64# -> Int# -> Word64#
60 foreign import ccall unsafe "hs_uncheckedShiftRL64"  uncheckedShiftRL64#  :: Word64# -> Int# -> Word64#
61 foreign import ccall unsafe "hs_uncheckedIShiftL64"  uncheckedIShiftL64#  :: Int64# -> Int# -> Int64#
62 foreign import ccall unsafe "hs_uncheckedIShiftRA64" uncheckedIShiftRA64# :: Int64# -> Int# -> Int64#
63 foreign import ccall unsafe "hs_uncheckedIShiftRL64" uncheckedIShiftRL64# :: Int64# -> Int# -> Int64#
64
65 foreign import ccall unsafe "hs_int64ToWord64"   int64ToWord64#   :: Int64# -> Word64#
66 foreign import ccall unsafe "hs_word64ToInt64"   word64ToInt64#   :: Word64# -> Int64#
67 foreign import ccall unsafe "hs_intToInt64"      intToInt64#      :: Int# -> Int64#
68 foreign import ccall unsafe "hs_int64ToInt"      int64ToInt#      :: Int64# -> Int#
69 foreign import ccall unsafe "hs_wordToWord64"    wordToWord64#    :: Word# -> Word64#
70 foreign import ccall unsafe "hs_word64ToWord"    word64ToWord#    :: Word64# -> Word#
71
72 #endif
73