mirror of
https://github.com/golang/go
synced 2024-11-24 06:40:17 -07:00
liblink: fix Plan 9 warnings
warning: src/liblink/asm5.c:485 non-interruptable temporary warning: src/liblink/asm5.c:565 set and not used: c warning: src/liblink/asm5.c:622 format mismatch ux VLONG, arg 2 warning: src/liblink/asm5.c:1218 overspecified class: asmout GLOBL STATIC warning: src/liblink/asm5.c:2088 overspecified class: oprrr GLOBL STATIC warning: src/liblink/asm5.c:2202 overspecified class: opbra GLOBL STATIC warning: src/liblink/asm5.c:2237 overspecified class: olr GLOBL STATIC warning: src/liblink/asm5.c:2266 overspecified class: olhr GLOBL STATIC warning: src/liblink/asm5.c:2291 overspecified class: osr GLOBL STATIC warning: src/liblink/asm5.c:2302 overspecified class: oshr GLOBL STATIC warning: src/liblink/asm5.c:2312 overspecified class: osrr GLOBL STATIC warning: src/liblink/asm5.c:2319 overspecified class: oshrr GLOBL STATIC warning: src/liblink/asm5.c:2325 overspecified class: olrr GLOBL STATIC warning: src/liblink/asm5.c:2332 overspecified class: olhrr GLOBL STATIC warning: src/liblink/asm5.c:2338 overspecified class: ofsr GLOBL STATIC warning: src/liblink/asm5.c:2375 overspecified class: omvl GLOBL STATIC warning: src/liblink/asm8.c:1261 format mismatch d VLONG, arg 3 warning: src/liblink/asm8.c:1274 format mismatch +d VLONG, arg 5 warning: src/liblink/list5.c:153 format mismatch d VLONG, arg 3 warning: src/liblink/list5.c:310 format mismatch d VLONG, arg 3 warning: src/liblink/obj6.c:665 set and not used: q warning: src/liblink/pcln.c:32 set and not used: p R=golang-dev, jas, gobot, rsc CC=golang-dev https://golang.org/cl/40370043
This commit is contained in:
parent
0f9311811c
commit
6e97513012
@ -479,8 +479,10 @@ span5(Link *ctxt, LSym *cursym)
|
|||||||
m = o->size;
|
m = o->size;
|
||||||
// must check literal pool here in case p generates many instructions
|
// must check literal pool here in case p generates many instructions
|
||||||
if(ctxt->blitrl){
|
if(ctxt->blitrl){
|
||||||
if(checkpool(ctxt, op, p->as == ACASE ? casesz(ctxt, p) : m))
|
if(checkpool(ctxt, op, p->as == ACASE ? casesz(ctxt, p) : m)) {
|
||||||
c = p->pc = scan(ctxt, op, p, c);
|
p->pc = scan(ctxt, op, p, c);
|
||||||
|
c = p->pc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(m == 0 && (p->as != AFUNCDATA && p->as != APCDATA)) {
|
if(m == 0 && (p->as != AFUNCDATA && p->as != APCDATA)) {
|
||||||
ctxt->diag("zero-width instruction\n%P", p);
|
ctxt->diag("zero-width instruction\n%P", p);
|
||||||
@ -560,8 +562,6 @@ span5(Link *ctxt, LSym *cursym)
|
|||||||
cursym->size = c;
|
cursym->size = c;
|
||||||
} while(bflag);
|
} while(bflag);
|
||||||
|
|
||||||
c += c&4;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* lay out the code. all the pc-relative code references,
|
* lay out the code. all the pc-relative code references,
|
||||||
* even cross-function, are resolved now;
|
* even cross-function, are resolved now;
|
||||||
@ -617,7 +617,7 @@ flushpool(Link *ctxt, Prog *p, int skip, int force)
|
|||||||
|
|
||||||
if(ctxt->blitrl) {
|
if(ctxt->blitrl) {
|
||||||
if(skip){
|
if(skip){
|
||||||
if(0 && skip==1)print("note: flush literal pool at %ux: len=%ud ref=%ux\n", p->pc+4, pool.size, pool.start);
|
if(0 && skip==1)print("note: flush literal pool at %llux: len=%ud ref=%ux\n", p->pc+4, pool.size, pool.start);
|
||||||
q = ctxt->arch->prg();
|
q = ctxt->arch->prg();
|
||||||
q->as = AB;
|
q->as = AB;
|
||||||
q->to.type = D_BRANCH;
|
q->to.type = D_BRANCH;
|
||||||
@ -1212,7 +1212,7 @@ buildop(Link *ctxt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
asmout(Link *ctxt, Prog *p, Optab *o, int32 *out, LSym *gmsym)
|
asmout(Link *ctxt, Prog *p, Optab *o, int32 *out, LSym *gmsym)
|
||||||
{
|
{
|
||||||
int32 o1, o2, o3, o4, o5, o6, v;
|
int32 o1, o2, o3, o4, o5, o6, v;
|
||||||
@ -2082,7 +2082,7 @@ if(0 /*debug['G']*/) print("%ux: %s: arm %d\n", (uint32)(p->pc), p->from.sym->na
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
oprrr(Link *ctxt, int a, int sc)
|
oprrr(Link *ctxt, int a, int sc)
|
||||||
{
|
{
|
||||||
int32 o;
|
int32 o;
|
||||||
@ -2196,7 +2196,7 @@ oprrr(Link *ctxt, int a, int sc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
opbra(Link *ctxt, int a, int sc)
|
opbra(Link *ctxt, int a, int sc)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -2231,7 +2231,7 @@ opbra(Link *ctxt, int a, int sc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
olr(Link *ctxt, int32 v, int b, int r, int sc)
|
olr(Link *ctxt, int32 v, int b, int r, int sc)
|
||||||
{
|
{
|
||||||
int32 o;
|
int32 o;
|
||||||
@ -2260,7 +2260,7 @@ olr(Link *ctxt, int32 v, int b, int r, int sc)
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
olhr(Link *ctxt, int32 v, int b, int r, int sc)
|
olhr(Link *ctxt, int32 v, int b, int r, int sc)
|
||||||
{
|
{
|
||||||
int32 o;
|
int32 o;
|
||||||
@ -2285,7 +2285,7 @@ olhr(Link *ctxt, int32 v, int b, int r, int sc)
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
osr(Link *ctxt, int a, int r, int32 v, int b, int sc)
|
osr(Link *ctxt, int a, int r, int32 v, int b, int sc)
|
||||||
{
|
{
|
||||||
int32 o;
|
int32 o;
|
||||||
@ -2296,7 +2296,7 @@ osr(Link *ctxt, int a, int r, int32 v, int b, int sc)
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
oshr(Link *ctxt, int r, int32 v, int b, int sc)
|
oshr(Link *ctxt, int r, int32 v, int b, int sc)
|
||||||
{
|
{
|
||||||
int32 o;
|
int32 o;
|
||||||
@ -2306,33 +2306,33 @@ oshr(Link *ctxt, int r, int32 v, int b, int sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
osrr(Link *ctxt, int r, int i, int b, int sc)
|
osrr(Link *ctxt, int r, int i, int b, int sc)
|
||||||
{
|
{
|
||||||
|
|
||||||
return olr(ctxt, i, b, r, sc) ^ ((1<<25) | (1<<20));
|
return olr(ctxt, i, b, r, sc) ^ ((1<<25) | (1<<20));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
oshrr(Link *ctxt, int r, int i, int b, int sc)
|
oshrr(Link *ctxt, int r, int i, int b, int sc)
|
||||||
{
|
{
|
||||||
return olhr(ctxt, i, b, r, sc) ^ ((1<<22) | (1<<20));
|
return olhr(ctxt, i, b, r, sc) ^ ((1<<22) | (1<<20));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
olrr(Link *ctxt, int i, int b, int r, int sc)
|
olrr(Link *ctxt, int i, int b, int r, int sc)
|
||||||
{
|
{
|
||||||
|
|
||||||
return olr(ctxt, i, b, r, sc) ^ (1<<25);
|
return olr(ctxt, i, b, r, sc) ^ (1<<25);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
olhrr(Link *ctxt, int i, int b, int r, int sc)
|
olhrr(Link *ctxt, int i, int b, int r, int sc)
|
||||||
{
|
{
|
||||||
return olhr(ctxt, i, b, r, sc) ^ (1<<22);
|
return olhr(ctxt, i, b, r, sc) ^ (1<<22);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
ofsr(Link *ctxt, int a, int r, int32 v, int b, int sc, Prog *p)
|
ofsr(Link *ctxt, int a, int r, int32 v, int b, int sc, Prog *p)
|
||||||
{
|
{
|
||||||
int32 o;
|
int32 o;
|
||||||
@ -2369,7 +2369,7 @@ ofsr(Link *ctxt, int a, int r, int32 v, int b, int sc, Prog *p)
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
static int32
|
||||||
omvl(Link *ctxt, Prog *p, Addr *a, int dr)
|
omvl(Link *ctxt, Prog *p, Addr *a, int dr)
|
||||||
{
|
{
|
||||||
int32 v, o1;
|
int32 v, o1;
|
||||||
|
@ -1263,7 +1263,7 @@ span8(Link *ctxt, LSym *s)
|
|||||||
s->size = c;
|
s->size = c;
|
||||||
|
|
||||||
if(0 /* debug['a'] > 1 */) {
|
if(0 /* debug['a'] > 1 */) {
|
||||||
print("span1 %s %d (%d tries)\n %.6ux", s->name, s->size, n, 0);
|
print("span1 %s %lld (%d tries)\n %.6ux", s->name, s->size, n, 0);
|
||||||
for(i=0; i<s->np; i++) {
|
for(i=0; i<s->np; i++) {
|
||||||
print(" %.2ux", s->p[i]);
|
print(" %.2ux", s->p[i]);
|
||||||
if(i%16 == 15)
|
if(i%16 == 15)
|
||||||
@ -1276,7 +1276,7 @@ span8(Link *ctxt, LSym *s)
|
|||||||
Reloc *r;
|
Reloc *r;
|
||||||
|
|
||||||
r = &s->r[i];
|
r = &s->r[i];
|
||||||
print(" rel %#.4ux/%d %s%+d\n", r->off, r->siz, r->sym->name, r->add);
|
print(" rel %#.4ux/%d %s%+lld\n", r->off, r->siz, r->sym->name, r->add);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ Dconv(Fmt *fp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case D_CONST2:
|
case D_CONST2:
|
||||||
sprint(str, "$%d-%d", a->offset, a->offset2);
|
sprint(str, "$%lld-%d", a->offset, a->offset2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D_SHIFT:
|
case D_SHIFT:
|
||||||
@ -307,7 +307,7 @@ Nconv(Fmt *fp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case D_NONE:
|
case D_NONE:
|
||||||
sprint(str, "%d", a->offset);
|
sprint(str, "%lld", a->offset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case D_EXTERN:
|
case D_EXTERN:
|
||||||
|
@ -647,7 +647,6 @@ stacksplit(Link *ctxt, Prog *p, int32 framesize, int32 textarg, Prog **jmpok)
|
|||||||
q1->pcond = p;
|
q1->pcond = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
q = nil;
|
|
||||||
q1 = nil;
|
q1 = nil;
|
||||||
if(framesize <= StackSmall) {
|
if(framesize <= StackSmall) {
|
||||||
// small stack: SP <= stackguard
|
// small stack: SP <= stackguard
|
||||||
|
@ -29,7 +29,7 @@ addvarint(Link *ctxt, Pcdata *d, uint32 val)
|
|||||||
p = d->p + d->n;
|
p = d->p + d->n;
|
||||||
for(v = val; v >= 0x80; v >>= 7)
|
for(v = val; v >= 0x80; v >>= 7)
|
||||||
*p++ = v | 0x80;
|
*p++ = v | 0x80;
|
||||||
*p++ = v;
|
*p = v;
|
||||||
d->n += n;
|
d->n += n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user