From: Simon Marlow Date: Fri, 3 Aug 2007 09:32:29 +0000 (+0000) Subject: mkLiveness: when calculating the size of a parameter, round up not down. X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=7305dd722118cabc6feb3fca74bcac64236b1513 mkLiveness: when calculating the size of a parameter, round up not down. Fixes read002 on x86_64 (and maybe others). The stg_ap_f_info info table had the wrong liveness on it, because the float had been treated as having zero size. --- diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs index 3ee0da8..017efe4 100644 --- a/compiler/cmm/CmmInfo.hs +++ b/compiler/cmm/CmmInfo.hs @@ -214,7 +214,9 @@ mkLiveness uniq live = mkBits (reg:regs) = take sizeW bits ++ mkBits regs where sizeW = case reg of Nothing -> 1 - Just r -> machRepByteWidth (localRegRep r) `quot` wORD_SIZE + Just r -> (machRepByteWidth (localRegRep r) + wORD_SIZE - 1) + `quot` wORD_SIZE + -- number of words, rounded up bits = repeat $ is_non_ptr reg -- True <=> Non Ptr is_non_ptr Nothing = True