diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/cmm/CmmInfo.hs | 3 | ||||
-rw-r--r-- | compiler/cmm/PprC.hs | 11 | ||||
-rw-r--r-- | compiler/codeGen/ClosureInfo.lhs | 6 | ||||
-rw-r--r-- | compiler/codeGen/StgCmmLayout.hs | 4 | ||||
-rw-r--r-- | compiler/types/TyCon.lhs | 2 |
5 files changed, 12 insertions, 14 deletions
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs index 94e38ae071..0735937754 100644 --- a/compiler/cmm/CmmInfo.hs +++ b/compiler/cmm/CmmInfo.hs @@ -24,7 +24,6 @@ import qualified Stream import Hoopl import Maybes -import Constants import DynFlags import Panic import UniqSupply @@ -323,7 +322,7 @@ mkLivenessBits dflags liveness [b] -> b _ -> panic "mkLiveness" bitmap_word = fromIntegral n_bits - .|. (small_bitmap `shiftL` bITMAP_BITS_SHIFT) + .|. (small_bitmap `shiftL` bITMAP_BITS_SHIFT dflags) lits = mkWordCLit dflags (fromIntegral n_bits) : map (mkWordCLit dflags) bitmap -- The first word is the size. The structure must match diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index e6c9ac3a15..bb2f189e14 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -31,7 +31,6 @@ import OldCmm import OldPprCmm () -- Utils -import Constants import CPrim import DynFlags import FastString @@ -1126,11 +1125,11 @@ pprHexVal w rep -- times values are unsigned. This also helps eliminate occasional -- warnings about integer overflow from gcc. - repsuffix W64 - | cINT_SIZE == 8 = char 'U' - | cLONG_SIZE == 8 = ptext (sLit "UL") - | cLONG_LONG_SIZE == 8 = ptext (sLit "ULL") - | otherwise = panic "pprHexVal: Can't find a 64-bit type" + repsuffix W64 = sdocWithDynFlags $ \dflags -> + if cINT_SIZE dflags == 8 then char 'U' + else if cLONG_SIZE dflags == 8 then ptext (sLit "UL") + else if cLONG_LONG_SIZE dflags == 8 then ptext (sLit "ULL") + else panic "pprHexVal: Can't find a 64-bit type" repsuffix _ = char 'U' go 0 = empty diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs index 6b6bd8b294..20ac63f6d2 100644 --- a/compiler/codeGen/ClosureInfo.lhs +++ b/compiler/codeGen/ClosureInfo.lhs @@ -343,14 +343,14 @@ separateByPtrFollowness things \begin{code} cgRepSizeB :: DynFlags -> CgRep -> ByteOff -cgRepSizeB _ DoubleArg = dOUBLE_SIZE +cgRepSizeB dflags DoubleArg = dOUBLE_SIZE dflags cgRepSizeB _ LongArg = wORD64_SIZE cgRepSizeB _ VoidArg = 0 cgRepSizeB dflags _ = wORD_SIZE dflags cgRepSizeW :: DynFlags -> CgRep -> ByteOff -cgRepSizeW dflags DoubleArg = dOUBLE_SIZE `quot` wORD_SIZE dflags -cgRepSizeW dflags LongArg = wORD64_SIZE `quot` wORD_SIZE dflags +cgRepSizeW dflags DoubleArg = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags +cgRepSizeW dflags LongArg = wORD64_SIZE `quot` wORD_SIZE dflags cgRepSizeW _ VoidArg = 0 cgRepSizeW _ _ = 1 diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs index 8e4d21e352..142100e109 100644 --- a/compiler/codeGen/StgCmmLayout.hs +++ b/compiler/codeGen/StgCmmLayout.hs @@ -387,8 +387,8 @@ argRepSizeW :: DynFlags -> ArgRep -> WordOff -- Size in words argRepSizeW _ N = 1 argRepSizeW _ P = 1 argRepSizeW _ F = 1 -argRepSizeW dflags L = wORD64_SIZE `quot` wORD_SIZE dflags -argRepSizeW dflags D = dOUBLE_SIZE `quot` wORD_SIZE dflags +argRepSizeW dflags L = wORD64_SIZE `quot` wORD_SIZE dflags +argRepSizeW dflags D = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags argRepSizeW _ V = 0 idArgRep :: Id -> ArgRep diff --git a/compiler/types/TyCon.lhs b/compiler/types/TyCon.lhs index 05c0ae5be3..06fef36102 100644 --- a/compiler/types/TyCon.lhs +++ b/compiler/types/TyCon.lhs @@ -784,7 +784,7 @@ primRepSizeW _ WordRep = 1 primRepSizeW dflags Int64Rep = wORD64_SIZE `quot` wORD_SIZE dflags primRepSizeW dflags Word64Rep= wORD64_SIZE `quot` wORD_SIZE dflags primRepSizeW _ FloatRep = 1 -- NB. might not take a full word -primRepSizeW dflags DoubleRep= dOUBLE_SIZE `quot` wORD_SIZE dflags +primRepSizeW dflags DoubleRep= dOUBLE_SIZE dflags `quot` wORD_SIZE dflags primRepSizeW _ AddrRep = 1 primRepSizeW _ PtrRep = 1 primRepSizeW _ VoidRep = 0 |