if(a->offset < unmappedzero)
return;
if(!canemitcode)
- fatal("checkoffset %#llx, cannot emit code", a->offset);
+ fatal("checkoffset %#x, cannot emit code", a->offset);
// cannot rely on unmapped nil page at 0 to catch
// reference with large offset. instead, emit explicit
if(a->offset < unmappedzero)
return;
if(!canemitcode)
- fatal("checkoffset %#llx, cannot emit code", a->offset);
+ fatal("checkoffset %#x, cannot emit code", a->offset);
// cannot rely on unmapped nil page at 0 to catch
// reference with large offset. instead, emit explicit
s->size = c;
if(debug['a'] > 1) {
- print("span1 %s %lld (%d tries)\n %.6ux", s->name, s->size, n, 0);
+ print("span1 %s %d (%d tries)\n %.6ux", s->name, s->size, n, 0);
for(i=0; i<s->np; i++) {
print(" %.2ux", s->p[i]);
if(i%16 == 15)
Reloc *r;
r = &s->r[i];
- print(" rel %#.4ux/%d %s%+lld\n", r->off, r->siz, r->sym->name, r->add);
+ print(" rel %#.4ux/%d %s%+d\n", r->off, r->siz, r->sym->name, r->add);
}
}
}
for(; addr < sym->value+sym->size; addr++)
cput(0);
if(addr != sym->value+sym->size) {
- diag("phase error: addr=%#llx value+size=%#llx", addr, sym->value+sym->size);
+ diag("phase error: addr=%#llx value+size=%#llx", (vlong)addr, (vlong)sym->value+sym->size);
errorexit();
}
}
continue;
}
- Bprint(&bso, "%.6llux\t%-20s | %P\n", sym->value, sym->name, p);
+ Bprint(&bso, "%.6llux\t%-20s | %P\n", (vlong)sym->value, sym->name, p);
for(p = p->link; p != P; p = p->link) {
if(p->link != P)
epc = p->link->pc;
s->type = SDATA;
if(s->np > s->size)
diag("%s: initialize bounds (%lld < %d)",
- s->name, s->size, s->np);
+ s->name, (vlong)s->size, s->np);
}
/*
gotype->r[i].siz,
gotype->r[i].type,
gotype->r[i].sym->name,
- gotype->r[i].add);
+ (vlong)gotype->r[i].add);
}
}
lline = lh->line + q->line - lh->absline;
if (debug['v'] > 1)
- print("%6llux %s[%lld] %P\n", q->pc, histfile[lh->file], lline, q);
+ print("%6llux %s[%lld] %P\n", (vlong)q->pc, histfile[lh->file], lline, q);
if (q->line == lc)
continue;
if(p->line == oldlc || p->as == ATEXT || p->as == ANOP) {
if(debug['O'])
Bprint(&bso, "%6llux %P\n",
- p->pc, p);
+ (vlong)p->pc, p);
continue;
}
if(debug['O'])
Bprint(&bso, " lc%d(%d,%d)\n",
s, 0, s);
Bprint(&bso, "%6llux %P\n",
- p->pc, p);
+ (vlong)p->pc, p);
}
lcsize += 5;
continue;
if(debug['O']) {
Bprint(&bso, " lc+%d(%d)\n", s, 0+s);
Bprint(&bso, "%6llux %P\n",
- p->pc, p);
+ (vlong)p->pc, p);
}
} else {
*bp = 64-s; /* 65-128 -lc */
if(debug['O']) {
Bprint(&bso, " lc%d(%d)\n", s, 64-s);
Bprint(&bso, "%6llux %P\n",
- p->pc, p);
+ (vlong)p->pc, p);
}
}
lcsize++;
void
x86_regprint(void)
{
- fprint(2, "ax\t0x%llux\n", ureg_x86.ax);
- fprint(2, "bx\t0x%llux\n", ureg_x86.bx);
- fprint(2, "cx\t0x%llux\n", ureg_x86.cx);
- fprint(2, "dx\t0x%llux\n", ureg_x86.dx);
- fprint(2, "si\t0x%llux\n", ureg_x86.si);
- fprint(2, "di\t0x%llux\n", ureg_x86.di);
- fprint(2, "bp\t0x%llux\n", ureg_x86.bp);
- fprint(2, "ds\t0x%llux\n", ureg_x86.ds);
- fprint(2, "es\t0x%llux\n", ureg_x86.es);
- fprint(2, "fs\t0x%llux\n", ureg_x86.fs);
- fprint(2, "gs\t0x%llux\n", ureg_x86.gs);
- fprint(2, "cs\t0x%llux\n", ureg_x86.cs);
- fprint(2, "flags\t0x%llux\n", ureg_x86.flags);
- fprint(2, "pc\t0x%llux\n", ureg_x86.pc);
- fprint(2, "sp\t0x%llux\n", ureg_x86.sp);
- fprint(2, "ss\t0x%llux\n", ureg_x86.ss);
+ fprint(2, "ax\t0x%ux\n", ureg_x86.ax);
+ fprint(2, "bx\t0x%ux\n", ureg_x86.bx);
+ fprint(2, "cx\t0x%ux\n", ureg_x86.cx);
+ fprint(2, "dx\t0x%ux\n", ureg_x86.dx);
+ fprint(2, "si\t0x%ux\n", ureg_x86.si);
+ fprint(2, "di\t0x%ux\n", ureg_x86.di);
+ fprint(2, "bp\t0x%ux\n", ureg_x86.bp);
+ fprint(2, "ds\t0x%ux\n", ureg_x86.ds);
+ fprint(2, "es\t0x%ux\n", ureg_x86.es);
+ fprint(2, "fs\t0x%ux\n", ureg_x86.fs);
+ fprint(2, "gs\t0x%ux\n", ureg_x86.gs);
+ fprint(2, "cs\t0x%ux\n", ureg_x86.cs);
+ fprint(2, "flags\t0x%ux\n", ureg_x86.flags);
+ fprint(2, "pc\t0x%ux\n", ureg_x86.pc);
+ fprint(2, "sp\t0x%ux\n", ureg_x86.sp);
+ fprint(2, "ss\t0x%ux\n", ureg_x86.ss);
}
int