summaryrefslogtreecommitdiff
path: root/src/cmd/6g/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/6g/list.c')
-rw-r--r--src/cmd/6g/list.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/cmd/6g/list.c b/src/cmd/6g/list.c
index 9194b1dab..c8077c97a 100644
--- a/src/cmd/6g/list.c
+++ b/src/cmd/6g/list.c
@@ -47,24 +47,28 @@ Pconv(Fmt *fp)
{
char str[STRINGSZ];
Prog *p;
+ char scale[40];
p = va_arg(fp->args, Prog*);
sconsize = 8;
+ scale[0] = '\0';
+ if(p->from.scale != 0 && (p->as == AGLOBL || p->as == ATEXT))
+ snprint(scale, sizeof scale, "%d,", p->from.scale);
switch(p->as) {
default:
- snprint(str, sizeof(str), "%.4ld (%L) %-7A %D,%D",
- p->loc, p->lineno, p->as, &p->from, &p->to);
+ snprint(str, sizeof(str), "%.4d (%L) %-7A %D,%s%D",
+ p->loc, p->lineno, p->as, &p->from, scale, &p->to);
break;
case ADATA:
sconsize = p->from.scale;
- snprint(str, sizeof(str), "%.4ld (%L) %-7A %D/%d,%D",
+ snprint(str, sizeof(str), "%.4d (%L) %-7A %D/%d,%D",
p->loc, p->lineno, p->as, &p->from, sconsize, &p->to);
break;
case ATEXT:
- snprint(str, sizeof(str), "%.4ld (%L) %-7A %D,%lD",
- p->loc, p->lineno, p->as, &p->from, &p->to);
+ snprint(str, sizeof(str), "%.4d (%L) %-7A %D,%s%lD",
+ p->loc, p->lineno, p->as, &p->from, scale, &p->to);
break;
}
return fmtstrcpy(fp, str);
@@ -104,7 +108,7 @@ Dconv(Fmt *fp)
if(a->branch == nil)
snprint(str, sizeof(str), "<nil>");
else
- snprint(str, sizeof(str), "%ld", a->branch->loc);
+ snprint(str, sizeof(str), "%d", a->branch->loc);
break;
case D_EXTERN:
@@ -127,7 +131,7 @@ Dconv(Fmt *fp)
if(fp->flags & FmtLong) {
d1 = a->offset & 0xffffffffLL;
d2 = (a->offset>>32) & 0xffffffffLL;
- snprint(str, sizeof(str), "$%lud-%lud", (ulong)d1, (ulong)d2);
+ snprint(str, sizeof(str), "$%ud-%ud", (ulong)d1, (ulong)d2);
break;
}
snprint(str, sizeof(str), "$%lld", a->offset);