[project @ 2005-04-08 10:15:38 by simonmar]
authorsimonmar <unknown>
Fri, 8 Apr 2005 10:15:38 +0000 (10:15 +0000)
committersimonmar <unknown>
Fri, 8 Apr 2005 10:15:38 +0000 (10:15 +0000)
Tell the C backend that BaseReg has a "strange type" (this forces it
to cast it to StgWord before doing arithmetic)

ghc/compiler/cmm/PprC.hs

index adfafaf..10d4da2 100644 (file)
@@ -640,6 +640,7 @@ isStrangeTypeReg (CmmGlobal g)      = isStrangeTypeGlobal g
 isStrangeTypeGlobal :: GlobalReg -> Bool
 isStrangeTypeGlobal CurrentTSO         = True
 isStrangeTypeGlobal CurrentNursery     = True
+isStrangeTypeGlobal BaseReg            = True
 isStrangeTypeGlobal r                  = isPtrGlobalReg r
 
 strangeRegType :: CmmReg -> Maybe SDoc