From 7305dd722118cabc6feb3fca74bcac64236b1513 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 3 Aug 2007 09:32:29 +0000 Subject: [PATCH] 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. --- compiler/cmm/CmmInfo.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 1.7.10.4