Commit 539a8f0e authored by Peter Trommler's avatar Peter Trommler 🥁 Committed by Ben Gamari

PPC NCG: Make `stackHeaderSize` more general

parent 64020fea
...@@ -582,14 +582,13 @@ ppc_mkLoadInstr dflags reg delta slot ...@@ -582,14 +582,13 @@ ppc_mkLoadInstr dflags reg delta slot
stackFrameHeaderSize :: DynFlags -> Int stackFrameHeaderSize :: DynFlags -> Int
stackFrameHeaderSize dflags stackFrameHeaderSize dflags
= case platformOS platform of = 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 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 where platform = targetPlatform dflags
-- | The maximum number of bytes required to spill a register. PPC32 -- | The maximum number of bytes required to spill a register. PPC32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment