mirror of
https://github.com/golang/go
synced 2024-11-25 01:08:02 -07:00
5c, 5g, 5l: fix arm bug
Using reg as the flag word was unfortunate, since the default value is not 0 but NREG (==16), which happens to be the bit NOPTR now. Clear it. If I say this will fix the build, it won't. R=golang-dev, r CC=golang-dev https://golang.org/cl/5690072
This commit is contained in:
parent
37decab5a3
commit
a5bc16d619
@ -1185,7 +1185,8 @@ gpseudo(int a, Sym *s, Node *n)
|
|||||||
if(a == ATEXT) {
|
if(a == ATEXT) {
|
||||||
p->reg = textflag;
|
p->reg = textflag;
|
||||||
textflag = 0;
|
textflag = 0;
|
||||||
}
|
} else if(a == AGLOBL)
|
||||||
|
p->reg = 0;
|
||||||
if(s->class == CSTATIC)
|
if(s->class == CSTATIC)
|
||||||
p->from.name = D_STATIC;
|
p->from.name = D_STATIC;
|
||||||
naddr(n, &p->to);
|
naddr(n, &p->to);
|
||||||
|
@ -75,6 +75,7 @@ prog(int as)
|
|||||||
p = dpc;
|
p = dpc;
|
||||||
dpc = mal(sizeof(*dpc));
|
dpc = mal(sizeof(*dpc));
|
||||||
p->link = dpc;
|
p->link = dpc;
|
||||||
|
p->reg = 0; // used for flags
|
||||||
} else {
|
} else {
|
||||||
p = pc;
|
p = pc;
|
||||||
pc = mal(sizeof(*pc));
|
pc = mal(sizeof(*pc));
|
||||||
@ -1116,7 +1117,8 @@ gins(int as, Node *f, Node *t)
|
|||||||
if(f != N)
|
if(f != N)
|
||||||
naddr(f, &af, 1);
|
naddr(f, &af, 1);
|
||||||
if(t != N)
|
if(t != N)
|
||||||
naddr(t, &at, 1); p = prog(as);
|
naddr(t, &at, 1);
|
||||||
|
p = prog(as);
|
||||||
if(f != N)
|
if(f != N)
|
||||||
p->from = af;
|
p->from = af;
|
||||||
if(t != N)
|
if(t != N)
|
||||||
|
@ -59,7 +59,7 @@ Pconv(Fmt *fp)
|
|||||||
switch(p->as) {
|
switch(p->as) {
|
||||||
default:
|
default:
|
||||||
snprint(str1, sizeof(str1), "%A%C", p->as, p->scond);
|
snprint(str1, sizeof(str1), "%A%C", p->as, p->scond);
|
||||||
if(p->reg == NREG)
|
if(p->reg == NREG && p->as != AGLOBL)
|
||||||
snprint(str, sizeof(str), "%.4d (%L) %-7s %D,%D",
|
snprint(str, sizeof(str), "%.4d (%L) %-7s %D,%D",
|
||||||
p->loc, p->lineno, str1, &p->from, &p->to);
|
p->loc, p->lineno, str1, &p->from, &p->to);
|
||||||
else
|
else
|
||||||
|
@ -65,7 +65,7 @@ Pconv(Fmt *fp)
|
|||||||
switch(a) {
|
switch(a) {
|
||||||
default:
|
default:
|
||||||
fmtprint(fp, "(%d)", p->line);
|
fmtprint(fp, "(%d)", p->line);
|
||||||
if(p->reg == NREG)
|
if(p->reg == NREG && p->as != AGLOBL)
|
||||||
fmtprint(fp, " %A%C %D,%D",
|
fmtprint(fp, " %A%C %D,%D",
|
||||||
a, p->scond, &p->from, &p->to);
|
a, p->scond, &p->from, &p->to);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user