diff options
author | Thijs Alkemade <me@thijsalkema.de> | 2016-12-06 17:12:17 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-06 18:44:43 -0500 |
commit | b7e88ee0d87f41cf1d8aba62aa44d5bf0a7404ad (patch) | |
tree | a80d546ceee8179f8eca6f26840da6edb74ca51e /compiler/nativeGen/PPC | |
parent | eafa06dce4aa815159ebba5a34d5137cf401ffbc (diff) | |
download | haskell-b7e88ee0d87f41cf1d8aba62aa44d5bf0a7404ad.tar.gz |
Reduce the size of string literals in binaries.
Removed the alignment for strings and mark then as cstring sections in
the generated asm so the linker can merge duplicate sections.
Reviewers: rwbarton, trofi, austin, trommler, simonmar, hvr, bgamari
Reviewed By: hvr, bgamari
Subscribers: simonpj, hvr, thomie
Differential Revision: https://phabricator.haskell.org/D1290
GHC Trac Issues: #9577
Diffstat (limited to 'compiler/nativeGen/PPC')
-rw-r--r-- | compiler/nativeGen/PPC/Ppr.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index 3dbb76d273..f0dd73e7a1 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -348,6 +348,12 @@ pprAlignForSection seg = ReadOnlyData16 | osDarwin -> sLit ".align 4" | otherwise -> sLit ".align 4" + -- TODO: This is copied from the ReadOnlyData case, but it can likely be + -- made more efficient. + CString + | osDarwin -> sLit ".align 2" + | ppc64 -> sLit ".align 3" + | otherwise -> sLit ".align 2" OtherSection _ -> panic "PprMach.pprSectionAlign: unknown section" pprDataItem :: CmmLit -> SDoc |