Commit 53677c96 authored by Peter Trommler's avatar Peter Trommler 🥁 Committed by Marge Bot

PPC NCG: print procedure end label for debug

Fixes #19118
parent bf95dd2c
...@@ -66,8 +66,9 @@ pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) = ...@@ -66,8 +66,9 @@ pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
_ -> pprLabel platform lbl) $$ -- blocks guaranteed not null, _ -> pprLabel platform lbl) $$ -- blocks guaranteed not null,
-- so label needed -- so label needed
vcat (map (pprBasicBlock config top_info) blocks) $$ vcat (map (pprBasicBlock config top_info) blocks) $$
(if ncgDwarfEnabled config ppWhen (ncgDwarfEnabled config) (pdoc platform (mkAsmTempEndLabel lbl)
then pdoc platform (mkAsmTempEndLabel lbl) <> char ':' else empty) $$ <> char ':' $$
pprProcEndLabel platform lbl) $$
pprSizeDecl platform lbl pprSizeDecl platform lbl
Just (CmmStaticsRaw info_lbl _) -> Just (CmmStaticsRaw info_lbl _) ->
...@@ -127,15 +128,20 @@ pprFunctionPrologue platform lab = pprGloblDecl platform lab ...@@ -127,15 +128,20 @@ pprFunctionPrologue platform lab = pprGloblDecl platform lab
$$ text "\t.localentry\t" <> pdoc platform lab $$ text "\t.localentry\t" <> pdoc platform lab
<> text ",.-" <> pdoc platform lab <> text ",.-" <> pdoc platform lab
pprProcEndLabel :: Platform -> CLabel -- ^ Procedure name
-> SDoc
pprProcEndLabel platform lbl =
pdoc platform (mkAsmTempProcEndLabel lbl) <> char ':'
pprBasicBlock :: NCGConfig -> LabelMap RawCmmStatics -> NatBasicBlock Instr pprBasicBlock :: NCGConfig -> LabelMap RawCmmStatics -> NatBasicBlock Instr
-> SDoc -> SDoc
pprBasicBlock config info_env (BasicBlock blockid instrs) pprBasicBlock config info_env (BasicBlock blockid instrs)
= maybe_infotable $$ = maybe_infotable $$
pprLabel platform asmLbl $$ pprLabel platform asmLbl $$
vcat (map (pprInstr platform) instrs) $$ vcat (map (pprInstr platform) instrs) $$
(if ncgDwarfEnabled config ppWhen (ncgDwarfEnabled config) (
then pdoc platform (mkAsmTempEndLabel asmLbl) <> char ':' pdoc platform (mkAsmTempEndLabel asmLbl) <> char ':'
else empty <> pprProcEndLabel platform asmLbl
) )
where where
asmLbl = blockLbl blockid asmLbl = blockLbl blockid
......
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