From 3be0a0ef6fb80d099aefdba67b68df3b500188bc Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 12 Jan 2015 15:17:10 -0500 Subject: liblink: adjustments for c2go conversion Mostly this is using uint32 instead of int32 for unsigned values like instruction encodings or float32 bit representations, removal of ternary operations, and removal of #defines. Delete sched9.c, because it is not compiled (it is still in the history if we ever need it). Change-Id: I68579cfea679438a27a80416727a9af932b088ae Reviewed-on: https://go-review.googlesource.com/2658 Reviewed-by: Austin Clements --- src/liblink/pass.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/liblink/pass.c') diff --git a/src/liblink/pass.c b/src/liblink/pass.c index 8721a6a796..6d4db2757a 100644 --- a/src/liblink/pass.c +++ b/src/liblink/pass.c @@ -69,6 +69,7 @@ void linkpatch(Link *ctxt, LSym *sym) { int32 c; + char *name; Prog *p, *q; ctxt->cursym = sym; @@ -95,8 +96,10 @@ linkpatch(Link *ctxt, LSym *sym) q = q->link; } if(q == nil) { - ctxt->diag("branch out of range (%#ux)\n%P [%s]", - c, p, p->to.sym ? p->to.sym->name : ""); + name = ""; + if(p->to.sym) + name = p->to.sym->name; + ctxt->diag("branch out of range (%#ux)\n%P [%s]", c, p, name); p->to.type = ctxt->arch->D_NONE; } p->to.u.branch = q; -- cgit v1.3-5-g9baa