[commit: ghc] master: PPC NCG: Register definitions for all 64-bit systems (341aa59)

git at git.haskell.org git at git.haskell.org
Fri Jan 18 01:42:25 UTC 2019


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/341aa59120dcc2fb712c94d12b65c886f0d5ae97/ghc

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

commit 341aa59120dcc2fb712c94d12b65c886f0d5ae97
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


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

341aa59120dcc2fb712c94d12b65c886f0d5ae97
 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