summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/SPARC/CodeGen/Base.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-09-17 13:09:22 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-09-17 13:09:22 +0100
commitb0db9308017fc14b600b3a85d9c55a037f12ee9e (patch)
treeb51b0b9d26b328b5e14e9d4d681219483f9c9b1f /compiler/nativeGen/SPARC/CodeGen/Base.hs
parent633dd5589f8625a8771ac75c5341ea225301d882 (diff)
parent8c3b9aca3aaf946a91c9af6c07fc9d2afb6bbb76 (diff)
downloadhaskell-b0db9308017fc14b600b3a85d9c55a037f12ee9e.tar.gz
Merge remote-tracking branch 'origin/master' into tc-untouchables
Conflicts: compiler/typecheck/TcMType.lhs compiler/typecheck/TcSMonad.lhs
Diffstat (limited to 'compiler/nativeGen/SPARC/CodeGen/Base.hs')
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Base.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs
index 469361139b..367d9230ba 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Base.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs
@@ -29,6 +29,7 @@ import Size
import Reg
import CodeGen.Platform
+import DynFlags
import OldCmm
import OldPprCmm ()
import Platform
@@ -114,13 +115,13 @@ getRegisterReg platform (CmmGlobal mid)
-- Expand CmmRegOff. ToDo: should we do it this way around, or convert
-- CmmExprs into CmmRegOff?
-mangleIndexTree :: CmmExpr -> CmmExpr
+mangleIndexTree :: DynFlags -> CmmExpr -> CmmExpr
-mangleIndexTree (CmmRegOff reg off)
+mangleIndexTree dflags (CmmRegOff reg off)
= CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)]
- where width = typeWidth (cmmRegType reg)
+ where width = typeWidth (cmmRegType dflags reg)
-mangleIndexTree _
+mangleIndexTree _ _
= panic "SPARC.CodeGen.Base.mangleIndexTree: no match"