mirror of
https://github.com/golang/go
synced 2024-11-19 02:14:43 -07:00
[dev.power64] liblink: fix printing of branch targets
Print PC stored in target Prog* of branch instructions when available instead of the offset stored in the branch instruction. The offset tends to be wrong after code transformations, so previously this led to confusing listings. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/168980043
This commit is contained in:
parent
810019286f
commit
473bfae5ae
@ -259,8 +259,9 @@ Dconv(Fmt *fp)
|
||||
sprint(str, "%s+%.5lux(BRANCH)", a->sym->name, v);
|
||||
else
|
||||
sprint(str, "%.5lux(BRANCH)", v);
|
||||
} else
|
||||
if(a->sym != nil)
|
||||
} else if(a->u.branch != nil)
|
||||
sprint(str, "%lld", a->u.branch->pc);
|
||||
else if(a->sym != nil)
|
||||
sprint(str, "%s+%lld(APC)", a->sym->name, a->offset);
|
||||
else
|
||||
sprint(str, "%lld(APC)", a->offset);
|
||||
|
Loading…
Reference in New Issue
Block a user