[Git][ghc/ghc][wip/angerman/32bit-cmm] Update CgUtils.hs

Moritz Angermann (@angerman) gitlab at gitlab.haskell.org
Tue Oct 10 03:58:41 UTC 2023



Moritz Angermann pushed to branch wip/angerman/32bit-cmm at Glasgow Haskell Compiler / GHC


Commits:
bd759277 by Moritz Angermann at 2023-10-10T03:58:39+00:00
Update CgUtils.hs
- - - - -


1 changed file:

- compiler/GHC/StgToCmm/CgUtils.hs


Changes:

=====================================
compiler/GHC/StgToCmm/CgUtils.hs
=====================================
@@ -184,11 +184,12 @@ fixStgRegStmt platform stmt = fixAssign $ mapExpDeep fixExpr stmt
             -- NB: to ensure type correctness we need to ensure the Add
             --     as well as the Int need to be of the same size as the
             --     register.
+            let greg' = CmmReg greg in 
             case globalRegUseGlobalReg reg `elem` activeStgRegs platform of
                 True  -> expr
-                False -> CmmMachOp (MO_Add (cmmRegWidth platform greg)) [
-                                    fixExpr (CmmReg greg),
+                False -> CmmMachOp (MO_Add (cmmRegWidth platform greg')) [
+                                    fixExpr greg',
                                     CmmLit (CmmInt (fromIntegral offset)
-                                                   (cmmRegWidth platform greg))]
+                                                   (cmmRegWidth platform greg'))]
 
         other_expr -> other_expr



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bd7592779d224deb1d5da19168738f27a30a3429

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bd7592779d224deb1d5da19168738f27a30a3429
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231009/2423b0ca/attachment-0001.html>


More information about the ghc-commits mailing list