Commit eaa2a364 authored by Russ Cox's avatar Russ Cox

libmach: always print 0x on hex numbers

R=r
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=21558
CL=21558
parent 83348f95
...@@ -1931,7 +1931,7 @@ immediate(Instr *ip, vlong val) ...@@ -1931,7 +1931,7 @@ immediate(Instr *ip, vlong val)
w = -w; w = -w;
if (issymref(ip, &s, w, val)) { if (issymref(ip, &s, w, val)) {
if (w) if (w)
bprint(ip, "%s+%lux(SB)", s.name, w); bprint(ip, "%s+%#lux(SB)", s.name, w);
else else
bprint(ip, "%s(SB)", s.name); bprint(ip, "%s(SB)", s.name);
return; return;
...@@ -1942,7 +1942,7 @@ immediate(Instr *ip, vlong val) ...@@ -1942,7 +1942,7 @@ immediate(Instr *ip, vlong val)
if (w < 0) if (w < 0)
w = -w; w = -w;
if (w < 4096) { if (w < 4096) {
bprint(ip, "%s-%lux(SB)", s.name, w); bprint(ip, "%s-%#lux(SB)", s.name, w);
return; return;
} }
} }
......
...@@ -113,7 +113,7 @@ symoff(char *buf, int n, uvlong v, int space) ...@@ -113,7 +113,7 @@ symoff(char *buf, int n, uvlong v, int space)
if (s.type != 't' && s.type != 'T' && delta >= 4096) if (s.type != 't' && s.type != 'T' && delta >= 4096)
return snprint(buf, n, "%llux", v); return snprint(buf, n, "%llux", v);
else if (delta) else if (delta)
return snprint(buf, n, "%s+%lux", s.name, delta); return snprint(buf, n, "%s+%#lux", s.name, delta);
else else
return snprint(buf, n, "%s", s.name); return snprint(buf, n, "%s", s.name);
} }
......
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