summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/SPARC/CodeGen/Base.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-08-28 20:52:44 +0100
committerIan Lynagh <ian@well-typed.com>2012-08-28 20:52:44 +0100
commitc0907ed27351e4160c0c8b2a5c9877899d87aae9 (patch)
treeae34750faa31e4c334ef9e3a5556093d30c11dea /compiler/nativeGen/SPARC/CodeGen/Base.hs
parent0e7d2906e706acdd716f121abb19c433986ae830 (diff)
downloadhaskell-c0907ed27351e4160c0c8b2a5c9877899d87aae9.tar.gz
Move more code into codeGen/CodeGen/Platform.hs
HaskellMachRegs.h is no longer included in anything under compiler/ Also, includes/CodeGen.Platform.hs now includes "stg/MachRegs.h" rather than <stg/MachRegs.h> which means that we always get the file from the tree, rather than from the bootstrapping compiler.
Diffstat (limited to 'compiler/nativeGen/SPARC/CodeGen/Base.hs')
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Base.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs
index 8990072c3f..469361139b 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Base.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs
@@ -25,12 +25,13 @@ import SPARC.Instr
import SPARC.Cond
import SPARC.AddrMode
import SPARC.Regs
-import SPARC.RegPlate
import Size
import Reg
+import CodeGen.Platform
import OldCmm
import OldPprCmm ()
+import Platform
import Outputable
import OrdList
@@ -98,13 +99,13 @@ setSizeOfRegister reg size
--------------------------------------------------------------------------------
-- | Grab the Reg for a CmmReg
-getRegisterReg :: CmmReg -> Reg
+getRegisterReg :: Platform -> CmmReg -> Reg
-getRegisterReg (CmmLocal (LocalReg u pk))
+getRegisterReg _ (CmmLocal (LocalReg u pk))
= RegVirtual $ mkVirtualReg u (cmmTypeSize pk)
-getRegisterReg (CmmGlobal mid)
- = case globalRegMaybe mid of
+getRegisterReg platform (CmmGlobal mid)
+ = case globalRegMaybe platform mid of
Just reg -> RegReal reg
Nothing -> pprPanic
"SPARC.CodeGen.Base.getRegisterReg: global is in memory"