[commit: ghc] master: Fix bumpTickyLitBy[E] on Win64; fixes #7940 (aec9b2d)

Ian Lynagh igloo at earth.li
Wed Jul 3 17:22:08 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/aec9b2d7092fbf8b1ba1c844d884c2ca0f229ba5

>---------------------------------------------------------------

commit aec9b2d7092fbf8b1ba1c844d884c2ca0f229ba5
Author: Ian Lynagh <ian at well-typed.com>
Date:   Tue Jul 2 15:48:08 2013 +0100

    Fix bumpTickyLitBy[E] on Win64; fixes #7940
    
    A comment claimed that the ticky counters are unsigned longs, but
    as far as I can see that isn't the case: They're already word-sized
    values.

>---------------------------------------------------------------

 compiler/codeGen/StgCmmTicky.hs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/compiler/codeGen/StgCmmTicky.hs b/compiler/codeGen/StgCmmTicky.hs
index 6c60647..f520dc6 100644
--- a/compiler/codeGen/StgCmmTicky.hs
+++ b/compiler/codeGen/StgCmmTicky.hs
@@ -570,14 +570,12 @@ bumpTickyLit lhs = bumpTickyLitBy lhs 1
 bumpTickyLitBy :: CmmLit -> Int -> FCode ()
 bumpTickyLitBy lhs n = do
   dflags <- getDynFlags
-  -- All the ticky-ticky counters are declared "unsigned long" in C
-  emit (addToMem (cLong dflags) (CmmLit lhs) n)
+  emit (addToMem (bWord dflags) (CmmLit lhs) n)
 
 bumpTickyLitByE :: CmmLit -> CmmExpr -> FCode ()
 bumpTickyLitByE lhs e = do
   dflags <- getDynFlags
-  -- All the ticky-ticky counters are declared "unsigned long" in C
-  emit (addToMemE (cLong dflags) (CmmLit lhs) e)
+  emit (addToMemE (bWord dflags) (CmmLit lhs) e)
 
 bumpHistogram :: FastString -> Int -> FCode ()
 bumpHistogram _lbl _n





More information about the ghc-commits mailing list