[commit: ghc] wip/T15916: PPC NCG: Make calling convention more general (fa05a86)
git at git.haskell.org
git at git.haskell.org
Sat Jan 5 08:47:05 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T15916
Link : http://ghc.haskell.org/trac/ghc/changeset/fa05a865c98d26dd8943023e111a3681176eb2d5/ghc
>---------------------------------------------------------------
commit fa05a865c98d26dd8943023e111a3681176eb2d5
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.
>---------------------------------------------------------------
fa05a865c98d26dd8943023e111a3681176eb2d5
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