[commit: ghc] wip/fix-osx-ci: PPC NCG: Make calling convention more general (c6ddea4)

git at git.haskell.org git at git.haskell.org
Thu Jan 17 18:56:49 UTC 2019


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

On branch  : wip/fix-osx-ci
Link       : http://ghc.haskell.org/trac/ghc/changeset/c6ddea42aad6511dd1e4c01188a7ca7417950cf3/ghc

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

commit c6ddea42aad6511dd1e4c01188a7ca7417950cf3
Author: Peter Trommler <ptrommler at acm.org>
Date:   Fri Dec 28 23:52:31 2018 +0100

    PPC NCG: Make calling convention more general
    
    All operating systems except AIX and Darwin follow the ELF
    specification.


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

c6ddea42aad6511dd1e4c01188a7ca7417950cf3
 compiler/nativeGen/PPC/CodeGen.hs | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index bbc3411..5586e0e 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -1570,13 +1570,12 @@ data GenCCallPlatform = GCPLinux | GCPLinux64ELF !Int | GCPAIX
 
 platformToGCP :: Platform -> GenCCallPlatform
 platformToGCP platform = case platformOS platform of
-    OSLinux  -> case platformArch platform of
-        ArchPPC           -> GCPLinux
-        ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1
-        ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2
-        _ -> panic "PPC.CodeGen.platformToGCP: Unknown Linux"
     OSAIX    -> GCPAIX
-    _ -> panic "PPC.CodeGen.platformToGCP: not defined for this OS"
+    _ -> case platformArch platform of
+            ArchPPC           -> GCPLinux
+            ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1
+            ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2
+	    _ -> panic "platformToGCP: Not PowerPC"
 
 
 genCCall'



More information about the ghc-commits mailing list