Fixes #5419.
R=golang-dev, dave, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/
9241044
continue;
if(s->type == types[TENUM])
continue;
- textflag = s->dataflag;
gpseudo(AGLOBL, s, nodconst(s->type->width));
- textflag = 0;
}
nextpc();
p->as = AEND;
p->from.type = D_OREG;
p->from.sym = s;
p->from.name = D_EXTERN;
- if(a == ATEXT || a == AGLOBL) {
+
+ switch(a) {
+ case ATEXT:
p->reg = textflag;
textflag = 0;
+ break;
+ case AGLOBL:
+ p->reg = s->dataflag;
+ break;
}
+
if(s->class == CSTATIC)
p->from.name = D_STATIC;
naddr(n, &p->to);
continue;
if(s->type == types[TENUM])
continue;
- textflag = s->dataflag;
gpseudo(AGLOBL, s, nodconst(s->type->width));
- textflag = 0;
}
nextpc();
p->as = AEND;
p->as = a;
p->from.type = D_EXTERN;
p->from.sym = s;
- p->from.scale = textflag;
- textflag = 0;
+
+ switch(a) {
+ case ATEXT:
+ p->from.scale = textflag;
+ textflag = 0;
+ break;
+ case AGLOBL:
+ p->from.scale = s->dataflag;
+ break;
+ }
if(s->class == CSTATIC)
p->from.type = D_STATIC;
continue;
if(s->type == types[TENUM])
continue;
- textflag = s->dataflag;
gpseudo(AGLOBL, s, nodconst(s->type->width));
- textflag = 0;
}
nextpc();
p->as = AEND;
p->as = a;
p->from.type = D_EXTERN;
p->from.sym = s;
- p->from.scale = textflag;
- textflag = 0;
+
+ switch(a) {
+ case ATEXT:
+ p->from.scale = textflag;
+ textflag = 0;
+ break;
+ case AGLOBL:
+ p->from.scale = s->dataflag;
+ break;
+ }
if(s->class == CSTATIC)
p->from.type = D_STATIC;