diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-18 20:44:20 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-18 20:44:20 +0100 |
commit | 3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b (patch) | |
tree | 6cc936273ae8993b1ab970c1e4e5f623cfd93920 /compiler/codeGen/CgUtils.hs | |
parent | 8244ec3416d6db22444e157731deb4d7b5e13824 (diff) | |
download | haskell-3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b.tar.gz |
Make StgHalfWord a portable type
It's now a newtyped Integer. Perhaps a newtyped Word32 would make more
sense, though.
Diffstat (limited to 'compiler/codeGen/CgUtils.hs')
-rw-r--r-- | compiler/codeGen/CgUtils.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index c52c8a8c99..2abdb0e589 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -795,21 +795,21 @@ getSRTInfo = do NoSRT -> return NoC_SRT SRTEntries {} -> panic "getSRTInfo: SRTEntries. Perhaps you forgot to run SimplStg?" SRT off len bmp - | len > hALF_WORD_SIZE_IN_BITS || bmp == [fromIntegral srt_escape] + | len > hALF_WORD_SIZE_IN_BITS || bmp == [fromInteger (fromStgHalfWord (srt_escape dflags))] -> do id <- newUnique let srt_desc_lbl = mkLargeSRTLabel id emitRODataLits "getSRTInfo" srt_desc_lbl ( cmmLabelOffW dflags srt_lbl off : mkWordCLit dflags (fromIntegral len) : map (mkWordCLit dflags) bmp) - return (C_SRT srt_desc_lbl 0 srt_escape) + return (C_SRT srt_desc_lbl 0 (srt_escape dflags)) | otherwise - -> return (C_SRT srt_lbl off (fromIntegral (head bmp))) + -> return (C_SRT srt_lbl off (toStgHalfWord dflags (toInteger (head bmp)))) -- The fromIntegral converts to StgHalfWord -srt_escape :: StgHalfWord -srt_escape = -1 +srt_escape :: DynFlags -> StgHalfWord +srt_escape dflags = toStgHalfWord dflags (-1) -- ----------------------------------------------------------------------------- -- |