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
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);
p = dpc;
dpc = mal(sizeof(*dpc));
p->link = dpc;
+ p->reg = 0; // used for flags
} else {
p = pc;
pc = mal(sizeof(*pc));
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)
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
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