Home | History | Annotate | Download | only in obj

Lines Matching full:ctxt

26 func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*Link, *LSym, int32, *Prog, int32, interface{}) int32, arg interface{}) {
27 dbg := desc == ctxt.Debugpcln
32 ctxt.Logf("funcpctab %s [valfunc=%s]\n", func_.Name, desc)
44 ctxt.Logf("%6x %6d %v\n", uint64(pc), val, func_.Func.Text)
51 val = valfunc(ctxt, func_, val, p, 0, arg)
54 val = valfunc(ctxt, func_, val, p, 1, arg)
56 ctxt.Logf("%6x %6s %v\n", uint64(p.Pc), "", p)
66 val = valfunc(ctxt, func_, val, p, 1, arg)
68 ctxt.Logf("%6x %6s %v\n", uint64(p.Pc), "", p)
88 ctxt.Logf("%6x %6d %v\n", uint64(p.Pc), val, p)
92 addvarint(dst, uint32((p.Pc-pc)/int64(ctxt.Arch.MinLC)))
105 val = valfunc(ctxt, func_, val, p, 1, arg)
110 ctxt.Logf("%6x done\n", uint64(func_.Func.Text.Pc+func_.Size))
112 addvarint(dst, uint32((func_.Size-pc)/int64(ctxt.Arch.MinLC)))
117 ctxt.Logf("wrote %d bytes to %p\n", len(dst.P), dst)
119 ctxt.Logf(" %02x", dst.P[i])
121 ctxt.Logf("\n")
129 func pctofileline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
133 f, l := linkgetlineFromPos(ctxt, p.Pos)
164 // addBranch adds a branch from the global inlining tree in ctxt to
166 func (s *pcinlineState) addBranch(ctxt *Link, globalIndex int) int {
180 call := ctxt.InlTree.nodes[globalIndex]
181 call.Parent = s.addBranch(ctxt, call.Parent)
191 func (s *pcinlineState) pctoinline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
196 posBase := ctxt.PosTable.Pos(p.Pos).Base()
210 return int32(s.addBranch(ctxt, globalIndex))
217 func pctospadj(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
225 ctxt.Diag("overflow in spadj: %d + %d = %d", oldval, p.Spadj, oldval+p.Spadj)
226 ctxt.DiagFlush()
238 func pctopcdata(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
243 ctxt.Diag("overflow in PCDATA instruction: %v", p)
244 ctxt.DiagFlush()
251 func linkpcln(ctxt *Link, cursym *LSym) {
277 funcpctab(ctxt, &pcln.Pcsp, cursym, "pctospadj", pctospadj, nil)
278 funcpctab(ctxt, &pcln.Pcfile, cursym, "pctofile", pctofileline, pcln)
279 funcpctab(ctxt, &pcln.Pcline, cursym, "pctoline", pctofileline, nil)
282 funcpctab(ctxt, &pcln.Pcinline, cursym, "pctoinline", pcinlineState.pctoinline, nil)
284 if ctxt.Debugpcln == "pctoinline" && len(pcln.InlTree.nodes) > 0 {
285 ctxt.Logf("-- inlining tree for %s:\n", cursym)
286 dumpInlTree(ctxt, pcln.InlTree)
287 ctxt.Logf("--\n")
296 ctxt.Diag("multiple definitions for FUNCDATA $%d", p.From.Offset)
311 funcpctab(ctxt, &pcln.Pcdata[i], cursym, "pctopcdata", pctopcdata, interface{}(uint32(i)))