[Git][ghc/ghc][master] PPC NCG: Fix .size directive on powerpc64 ELF v1
Marge Bot
gitlab at gitlab.haskell.org
Sat May 30 10:08:17 UTC 2020
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
7f8f948c by Peter Trommler at 2020-05-30T06:08:07-04:00
PPC NCG: Fix .size directive on powerpc64 ELF v1
Thanks to Sergei Trofimovich for pointing out the issue.
Fixes #18237
- - - - -
1 changed file:
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/PPC/Ppr.hs
=====================================
@@ -86,8 +86,13 @@ pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
pprSizeDecl :: Platform -> CLabel -> SDoc
pprSizeDecl platform lbl
= if osElfTarget (platformOS platform)
- then text "\t.size" <+> ppr lbl <> text ", .-" <> ppr lbl
+ then text "\t.size" <+> prettyLbl <> text ", .-" <> codeLbl
else empty
+ where
+ prettyLbl = ppr lbl
+ codeLbl
+ | platformArch platform == ArchPPC_64 ELF_V1 = char '.' <> prettyLbl
+ | otherwise = prettyLbl
pprFunctionDescriptor :: CLabel -> SDoc
pprFunctionDescriptor lab = pprGloblDecl lab
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7f8f948c024c46282228243391238d09b297cd9d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7f8f948c024c46282228243391238d09b297cd9d
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200530/44b95cf6/attachment.html>
More information about the ghc-commits
mailing list