mirror of
https://github.com/golang/go
synced 2024-11-21 16:44:43 -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) {
|
||||
p->reg = textflag;
|
||||
textflag = 0;
|
||||
}
|
||||
} else if(a == AGLOBL)
|
||||
p->reg = 0;
|
||||
if(s->class == CSTATIC)
|
||||
p->from.name = D_STATIC;
|
||||
naddr(n, &p->to);
|
||||
|
@ -75,6 +75,7 @@ prog(int as)
|
||||
p = dpc;
|
||||
dpc = mal(sizeof(*dpc));
|
||||
p->link = dpc;
|
||||
p->reg = 0; // used for flags
|
||||
} else {
|
||||
p = pc;
|
||||
pc = mal(sizeof(*pc));
|
||||
@ -1116,7 +1117,8 @@ gins(int as, Node *f, Node *t)
|
||||
if(f != N)
|
||||
naddr(f, &af, 1);
|
||||
if(t != N)
|
||||
naddr(t, &at, 1); p = prog(as);
|
||||
naddr(t, &at, 1);
|
||||
p = prog(as);
|
||||
if(f != N)
|
||||
p->from = af;
|
||||
if(t != N)
|
||||
|
@ -59,7 +59,7 @@ Pconv(Fmt *fp)
|
||||
switch(p->as) {
|
||||
default:
|
||||
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",
|
||||
p->loc, p->lineno, str1, &p->from, &p->to);
|
||||
else
|
||||
|
@ -65,7 +65,7 @@ Pconv(Fmt *fp)
|
||||
switch(a) {
|
||||
default:
|
||||
fmtprint(fp, "(%d)", p->line);
|
||||
if(p->reg == NREG)
|
||||
if(p->reg == NREG && p->as != AGLOBL)
|
||||
fmtprint(fp, " %A%C %D,%D",
|
||||
a, p->scond, &p->from, &p->to);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user