[commit: ghc] wip/T15916: PPC NCG: Register definitions for all 64-bit systems (9680424)

git at git.haskell.org git at git.haskell.org
Sat Jan 5 08:47:14 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T15916
Link       : http://ghc.haskell.org/trac/ghc/changeset/96804248f0b77a3fba108be61860c085ad617a29/ghc

>---------------------------------------------------------------

commit 96804248f0b77a3fba108be61860c085ad617a29
Author: Peter Trommler <ptrommler at acm.org>
Date:   Sat Dec 29 10:14:12 2018 +0100

    PPC NCG: Register definitions for all 64-bit systems


>---------------------------------------------------------------

96804248f0b77a3fba108be61860c085ad617a29
 compiler/nativeGen/PPC/Regs.hs | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
index a2c03b9..f0b9914 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



More information about the ghc-commits mailing list