diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-01-30 10:05:19 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-30 10:05:19 -0500 |
commit | 172a59335fa6c76b17fb6795e87fbc7fcfd198e6 (patch) | |
tree | 6e5e940cb2c6ae9110807fa0d637a280c63b4220 /libraries | |
parent | 76c8fd674435a652c75a96c85abbf26f1f221876 (diff) | |
download | haskell-172a59335fa6c76b17fb6795e87fbc7fcfd198e6.tar.gz |
Revert "Batch merge"
This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/Bits.hs | 8 | ||||
-rw-r--r-- | libraries/base/GHC/Int.hs | 13 | ||||
-rw-r--r-- | libraries/base/GHC/RTS/Flags.hsc | 3 | ||||
-rw-r--r-- | libraries/base/GHC/Word.hs | 13 | ||||
-rw-r--r-- | libraries/base/tests/IO/T12010/test.T | 3 | ||||
-rw-r--r-- | libraries/base/tests/IO/all.T | 9 |
6 files changed, 7 insertions, 42 deletions
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index 69446f9adc..000e663b83 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -438,9 +438,6 @@ instance Bits Int where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - -- We want popCnt# to be inlined in user code so that `ghc -msse4.2` - -- can compile it down to a popcnt instruction without an extra function call - {-# INLINE popCount #-} zeroBits = 0 @@ -481,16 +478,13 @@ instance Bits Int where instance FiniteBits Int where finiteBitSize _ = WORD_SIZE_IN_BITS countLeadingZeros (I# x#) = I# (word2Int# (clz# (int2Word# x#))) - {-# INLINE countLeadingZeros #-} countTrailingZeros (I# x#) = I# (word2Int# (ctz# (int2Word# x#))) - {-# INLINE countTrailingZeros #-} -- | @since 2.01 instance Bits Word where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (W# x#) .&. (W# y#) = W# (x# `and#` y#) (W# x#) .|. (W# y#) = W# (x# `or#` y#) @@ -525,9 +519,7 @@ instance Bits Word where instance FiniteBits Word where finiteBitSize _ = WORD_SIZE_IN_BITS countLeadingZeros (W# x#) = I# (word2Int# (clz# x#)) - {-# INLINE countLeadingZeros #-} countTrailingZeros (W# x#) = I# (word2Int# (ctz# x#)) - {-# INLINE countTrailingZeros #-} -- | @since 2.01 instance Bits Integer where diff --git a/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs index d87d352cb7..2c5ca9d5a8 100644 --- a/libraries/base/GHC/Int.hs +++ b/libraries/base/GHC/Int.hs @@ -177,7 +177,6 @@ instance Bits Int8 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (I8# x#) .&. (I8# y#) = I8# (word2Int# (int2Word# x# `and#` int2Word# y#)) (I8# x#) .|. (I8# y#) = I8# (word2Int# (int2Word# x# `or#` int2Word# y#)) @@ -212,8 +211,6 @@ instance Bits Int8 where -- | @since 4.6.0.0 instance FiniteBits Int8 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 8 countLeadingZeros (I8# x#) = I# (word2Int# (clz8# (int2Word# x#))) countTrailingZeros (I8# x#) = I# (word2Int# (ctz8# (int2Word# x#))) @@ -384,7 +381,6 @@ instance Bits Int16 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (I16# x#) .&. (I16# y#) = I16# (word2Int# (int2Word# x# `and#` int2Word# y#)) (I16# x#) .|. (I16# y#) = I16# (word2Int# (int2Word# x# `or#` int2Word# y#)) @@ -419,8 +415,6 @@ instance Bits Int16 where -- | @since 4.6.0.0 instance FiniteBits Int16 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 16 countLeadingZeros (I16# x#) = I# (word2Int# (clz16# (int2Word# x#))) countTrailingZeros (I16# x#) = I# (word2Int# (ctz16# (int2Word# x#))) @@ -593,7 +587,6 @@ instance Bits Int32 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (I32# x#) .&. (I32# y#) = I32# (word2Int# (int2Word# x# `and#` int2Word# y#)) (I32# x#) .|. (I32# y#) = I32# (word2Int# (int2Word# x# `or#` int2Word# y#)) @@ -629,8 +622,6 @@ instance Bits Int32 where -- | @since 4.6.0.0 instance FiniteBits Int32 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 32 countLeadingZeros (I32# x#) = I# (word2Int# (clz32# (int2Word# x#))) countTrailingZeros (I32# x#) = I# (word2Int# (ctz32# (int2Word# x#))) @@ -834,7 +825,6 @@ instance Bits Int64 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (I64# x#) .&. (I64# y#) = I64# (word64ToInt64# (int64ToWord64# x# `and64#` int64ToWord64# y#)) (I64# x#) .|. (I64# y#) = I64# (word64ToInt64# (int64ToWord64# x# `or64#` int64ToWord64# y#)) @@ -1012,7 +1002,6 @@ instance Bits Int64 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (I64# x#) .&. (I64# y#) = I64# (word2Int# (int2Word# x# `and#` int2Word# y#)) (I64# x#) .|. (I64# y#) = I64# (word2Int# (int2Word# x# `or#` int2Word# y#)) @@ -1089,8 +1078,6 @@ uncheckedIShiftRA64# = uncheckedIShiftRA# -- | @since 4.6.0.0 instance FiniteBits Int64 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 64 #if WORD_SIZE_IN_BITS < 64 countLeadingZeros (I64# x#) = I# (word2Int# (clz64# (int64ToWord64# x#))) diff --git a/libraries/base/GHC/RTS/Flags.hsc b/libraries/base/GHC/RTS/Flags.hsc index 249bcd5a98..12cb828e6a 100644 --- a/libraries/base/GHC/RTS/Flags.hsc +++ b/libraries/base/GHC/RTS/Flags.hsc @@ -139,7 +139,6 @@ data MiscFlags = MiscFlags , generateStackTrace :: Bool , machineReadable :: Bool , internalCounters :: Bool - , linkerAlwaysPic :: Bool , linkerMemBase :: Word -- ^ address to ask the OS for memory for the linker, 0 ==> off } deriving ( Show -- ^ @since 4.8.0.0 @@ -445,8 +444,6 @@ getMiscFlags = do (#{peek MISC_FLAGS, machineReadable} ptr :: IO CBool)) <*> (toBool <$> (#{peek MISC_FLAGS, internalCounters} ptr :: IO CBool)) - <*> (toBool <$> - (#{peek MISC_FLAGS, linkerAlwaysPic} ptr :: IO CBool)) <*> #{peek MISC_FLAGS, linkerMemBase} ptr getDebugFlags :: IO DebugFlags diff --git a/libraries/base/GHC/Word.hs b/libraries/base/GHC/Word.hs index e714392e9c..d19a31dfb2 100644 --- a/libraries/base/GHC/Word.hs +++ b/libraries/base/GHC/Word.hs @@ -168,7 +168,6 @@ instance Bits Word8 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (W8# x#) .&. (W8# y#) = W8# (x# `and#` y#) (W8# x#) .|. (W8# y#) = W8# (x# `or#` y#) @@ -202,8 +201,6 @@ instance Bits Word8 where -- | @since 4.6.0.0 instance FiniteBits Word8 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 8 countLeadingZeros (W8# x#) = I# (word2Int# (clz8# x#)) countTrailingZeros (W8# x#) = I# (word2Int# (ctz8# x#)) @@ -359,7 +356,6 @@ instance Bits Word16 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (W16# x#) .&. (W16# y#) = W16# (x# `and#` y#) (W16# x#) .|. (W16# y#) = W16# (x# `or#` y#) @@ -393,8 +389,6 @@ instance Bits Word16 where -- | @since 4.6.0.0 instance FiniteBits Word16 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 16 countLeadingZeros (W16# x#) = I# (word2Int# (clz16# x#)) countTrailingZeros (W16# x#) = I# (word2Int# (ctz16# x#)) @@ -596,7 +590,6 @@ instance Bits Word32 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (W32# x#) .&. (W32# y#) = W32# (x# `and#` y#) (W32# x#) .|. (W32# y#) = W32# (x# `or#` y#) @@ -630,8 +623,6 @@ instance Bits Word32 where -- | @since 4.6.0.0 instance FiniteBits Word32 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 32 countLeadingZeros (W32# x#) = I# (word2Int# (clz32# x#)) countTrailingZeros (W32# x#) = I# (word2Int# (ctz32# x#)) @@ -771,7 +762,6 @@ instance Bits Word64 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (W64# x#) .&. (W64# y#) = W64# (x# `and64#` y#) (W64# x#) .|. (W64# y#) = W64# (x# `or64#` y#) @@ -924,7 +914,6 @@ instance Bits Word64 where {-# INLINE shift #-} {-# INLINE bit #-} {-# INLINE testBit #-} - {-# INLINE popCount #-} (W64# x#) .&. (W64# y#) = W64# (x# `and#` y#) (W64# x#) .|. (W64# y#) = W64# (x# `or#` y#) @@ -970,8 +959,6 @@ uncheckedShiftRL64# = uncheckedShiftRL# -- | @since 4.6.0.0 instance FiniteBits Word64 where - {-# INLINE countLeadingZeros #-} - {-# INLINE countTrailingZeros #-} finiteBitSize _ = 64 countLeadingZeros (W64# x#) = I# (word2Int# (clz64# x#)) countTrailingZeros (W64# x#) = I# (word2Int# (ctz64# x#)) diff --git a/libraries/base/tests/IO/T12010/test.T b/libraries/base/tests/IO/T12010/test.T index 43403abe31..73dac44c47 100644 --- a/libraries/base/tests/IO/T12010/test.T +++ b/libraries/base/tests/IO/T12010/test.T @@ -4,4 +4,5 @@ test('T12010', only_ways(['threaded1']), extra_ways(['threaded1']), cmd_prefix('WAY_FLAGS="' + ' '.join(config.way_flags['threaded1']) + '"')], - makefile_test, []) + run_command, + ['$MAKE -s --no-print-directory T12010']) diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T index 1912be7c94..dba0e5e3d7 100644 --- a/libraries/base/tests/IO/all.T +++ b/libraries/base/tests/IO/all.T @@ -89,14 +89,14 @@ test('hDuplicateTo001', [], compile_and_run, ['']) test('countReaders001', [], compile_and_run, ['']) test('concio001', [normal, multi_cpu_race], - makefile_test, ['test.concio001']) + run_command, ['$MAKE -s --no-print-directory test.concio001']) test('concio001.thr', [extra_files(['concio001.hs']), multi_cpu_race], - makefile_test, ['test.concio001.thr']) + run_command, ['$MAKE -s --no-print-directory test.concio001.thr']) test('concio002', reqlib('process'), compile_and_run, ['']) test('T2122', [], compile_and_run, ['']) -test('T3307', [], makefile_test, ['T3307-test']) +test('T3307', [], run_command, ['$MAKE -s --no-print-directory T3307-test']) test('T4855', normal, compile_and_run, ['']) test('hSetEncoding001',extra_run_opts('hSetEncoding001.in'), compile_and_run, ['']) @@ -118,7 +118,8 @@ test('encoding003', normal, compile_and_run, ['']) test('encoding004', extra_files(['encoded-data/']), compile_and_run, ['']) test('encoding005', normal, compile_and_run, ['']) -test('environment001', [], makefile_test, ['environment001-test']) +test('environment001', [], run_command, + ['$MAKE -s --no-print-directory environment001-test']) test('newline001', [], compile_and_run, ['']) |