summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Trommler <ptrommler@acm.org>2018-12-29 10:14:12 +0100
committerBen Gamari <ben@well-typed.com>2019-01-17 13:39:40 -0500
commit341aa59120dcc2fb712c94d12b65c886f0d5ae97 (patch)
treec35097f757eb1683607c491e0dff6edf1660fff5
parent9477bf594a990d47c1452531d441c31536fcca9c (diff)
downloadhaskell-341aa59120dcc2fb712c94d12b65c886f0d5ae97.tar.gz
PPC NCG: Register definitions for all 64-bit systems
-rw-r--r--compiler/nativeGen/PPC/Regs.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
index a2c03b9b3c..f0b9914270 100644
--- a/compiler/nativeGen/PPC/Regs.hs
+++ b/compiler/nativeGen/PPC/Regs.hs
@@ -229,11 +229,8 @@ allArgRegs = map regSingle [3..10]
-- these are the regs which we cannot assume stay alive over a C call.
callClobberedRegs :: Platform -> [Reg]
-callClobberedRegs platform
- = case platformOS platform of
- OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13])
- OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13])
- _ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture"
+callClobberedRegs _platform
+ = map regSingle (0:[2..12] ++ map fReg [0..13])
allMachRegNos :: [RegNo]
@@ -263,11 +260,10 @@ allFPArgRegs :: Platform -> [Reg]
allFPArgRegs platform
= case platformOS platform of
OSAIX -> map (regSingle . fReg) [1..13]
- OSLinux -> case platformArch platform of
+ _ -> case platformArch platform of
ArchPPC -> map (regSingle . fReg) [1..8]
ArchPPC_64 _ -> map (regSingle . fReg) [1..13]
_ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux"
- _ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture"
fits16Bits :: Integral a => a -> Bool
fits16Bits x = x >= -32768 && x < 32768