[commit: ghc] wip/T15916: PPC NCG: Make `stackHeaderSize` more general (753d27a)
git at git.haskell.org
git at git.haskell.org
Sun Mar 31 15:08:54 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T15916
Link : http://ghc.haskell.org/trac/ghc/changeset/753d27aad73725b46b81fb4f69956e50f9d1870c/ghc
>---------------------------------------------------------------
commit 753d27aad73725b46b81fb4f69956e50f9d1870c
Author: Peter Trommler <ptrommler at acm.org>
Date: Fri Dec 28 23:55:35 2018 +0100
PPC NCG: Make `stackHeaderSize` more general
>---------------------------------------------------------------
753d27aad73725b46b81fb4f69956e50f9d1870c
compiler/nativeGen/PPC/Instr.hs | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
index 8f3153c..fb62738 100644
--- a/compiler/nativeGen/PPC/Instr.hs
+++ b/compiler/nativeGen/PPC/Instr.hs
@@ -575,14 +575,13 @@ ppc_mkLoadInstr dflags reg delta slot
stackFrameHeaderSize :: DynFlags -> Int
stackFrameHeaderSize dflags
= case platformOS platform of
- OSLinux -> case platformArch platform of
- -- header + parameter save area
- ArchPPC -> 64 -- TODO: check ABI spec
- ArchPPC_64 ELF_V1 -> 48 + 8 * 8
- ArchPPC_64 ELF_V2 -> 32 + 8 * 8
- _ -> panic "PPC.stackFrameHeaderSize: Unknown Linux"
OSAIX -> 24 + 8 * 4
- _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS"
+ _ -> case platformArch platform of
+ -- header + parameter save area
+ ArchPPC -> 64 -- TODO: check ABI spec
+ ArchPPC_64 ELF_V1 -> 48 + 8 * 8
+ ArchPPC_64 ELF_V2 -> 32 + 8 * 8
+ _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS"
where platform = targetPlatform dflags
-- | The maximum number of bytes required to spill a register. PPC32
More information about the ghc-commits
mailing list