diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-08-24 10:02:35 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-08-28 09:16:44 +0100 |
commit | 1d36d88a681575176d026d7002e40d0ce5c45281 (patch) | |
tree | 3cccd971c822447f41a102eb20d15c2a4b2f76ff | |
parent | d82cecbe21772ca038df48207cce4b0ba1f33971 (diff) | |
download | haskell-1d36d88a681575176d026d7002e40d0ce5c45281.tar.gz |
Fix callerSaves, activeStgRegs, haveRegBase when unregisterised
-rw-r--r-- | compiler/codeGen/CodeGen/Platform.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/codeGen/CodeGen/Platform.hs b/compiler/codeGen/CodeGen/Platform.hs index 2ed99833a9..78fba978ec 100644 --- a/compiler/codeGen/CodeGen/Platform.hs +++ b/compiler/codeGen/CodeGen/Platform.hs @@ -17,6 +17,8 @@ import qualified CodeGen.Platform.NoRegs as NoRegs callerSaves :: Platform -> GlobalReg -> Bool callerSaves platform + | platformUnregisterised platform = NoRegs.callerSaves + | otherwise = case platformArch platform of ArchX86 -> X86.callerSaves ArchX86_64 -> X86_64.callerSaves @@ -37,6 +39,8 @@ callerSaves platform -- possbily mapped to real registers. activeStgRegs :: Platform -> [GlobalReg] activeStgRegs platform + | platformUnregisterised platform = NoRegs.activeStgRegs + | otherwise = case platformArch platform of ArchX86 -> X86.activeStgRegs ArchX86_64 -> X86_64.activeStgRegs @@ -52,6 +56,8 @@ activeStgRegs platform haveRegBase :: Platform -> Bool haveRegBase platform + | platformUnregisterised platform = NoRegs.haveRegBase + | otherwise = case platformArch platform of ArchX86 -> X86.haveRegBase ArchX86_64 -> X86_64.haveRegBase |