diff options
author | Peter Trommler <ptrommler@acm.org> | 2020-05-26 12:08:56 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-30 06:08:07 -0400 |
commit | 7f8f948c024c46282228243391238d09b297cd9d (patch) | |
tree | e123bae5ca7e3a15c25c26ff8a50bdb0e609e4cb /compiler/GHC/CmmToAsm/PPC | |
parent | 3d96016926cc88506db416f87b6e4b68a3a0d25f (diff) | |
download | haskell-7f8f948c024c46282228243391238d09b297cd9d.tar.gz |
PPC NCG: Fix .size directive on powerpc64 ELF v1
Thanks to Sergei Trofimovich for pointing out the issue.
Fixes #18237
Diffstat (limited to 'compiler/GHC/CmmToAsm/PPC')
-rw-r--r-- | compiler/GHC/CmmToAsm/PPC/Ppr.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/GHC/CmmToAsm/PPC/Ppr.hs b/compiler/GHC/CmmToAsm/PPC/Ppr.hs index 4ef5437b71..521d8e0a76 100644 --- a/compiler/GHC/CmmToAsm/PPC/Ppr.hs +++ b/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 |