Commit 801e40a0 authored by Russ Cox's avatar Russ Cox

cmd/gc: rename AFATVARDEF to AVARDEF

The "fat" referred to being used for multiword values only.
We're going to use it for non-fat values sometimes too.

No change other than the renaming.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/63650043
parent 824e918c
...@@ -772,7 +772,7 @@ clearfat(Node *nl) ...@@ -772,7 +772,7 @@ clearfat(Node *nl)
if(componentgen(N, nl)) if(componentgen(N, nl))
return; return;
gfatvardef(nl); gvardef(nl);
c = w % 4; // bytes c = w % 4; // bytes
q = w / 4; // quads q = w / 4; // quads
......
...@@ -1164,7 +1164,7 @@ copyu(Prog *p, Adr *v, Adr *s) ...@@ -1164,7 +1164,7 @@ copyu(Prog *p, Adr *v, Adr *s)
case APCDATA: case APCDATA:
case AFUNCDATA: case AFUNCDATA:
case AFATVARDEF: case AVARDEF:
return 0; return 0;
} }
} }
......
...@@ -29,7 +29,7 @@ static ProgInfo progtable[ALAST] = { ...@@ -29,7 +29,7 @@ static ProgInfo progtable[ALAST] = {
[AUNDEF]= {Break}, [AUNDEF]= {Break},
[AUSEFIELD]= {OK}, [AUSEFIELD]= {OK},
[ACHECKNIL]= {LeftRead}, [ACHECKNIL]= {LeftRead},
[AFATVARDEF]= {Pseudo | RightWrite}, [AVARDEF]= {Pseudo | RightWrite},
// NOP is an internal no-op that also stands // NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode. // for USED and SET annotations, not the Intel opcode.
......
...@@ -198,7 +198,7 @@ enum as ...@@ -198,7 +198,7 @@ enum as
AFUNCDATA, AFUNCDATA,
APCDATA, APCDATA,
ACHECKNIL, ACHECKNIL,
AFATVARDEF, AVARDEF,
AMRC, // MRC/MCR AMRC, // MRC/MCR
......
...@@ -1023,7 +1023,7 @@ clearfat(Node *nl) ...@@ -1023,7 +1023,7 @@ clearfat(Node *nl)
if(debug['g']) if(debug['g'])
dump("\nclearfat", nl); dump("\nclearfat", nl);
gfatvardef(nl); gvardef(nl);
w = nl->type->width; w = nl->type->width;
// Avoid taking the address for simple enough types. // Avoid taking the address for simple enough types.
......
...@@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = { ...@@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = {
[AUNDEF]= {Break}, [AUNDEF]= {Break},
[AUSEFIELD]= {OK}, [AUSEFIELD]= {OK},
[ACHECKNIL]= {LeftRead}, [ACHECKNIL]= {LeftRead},
[AFATVARDEF]= {Pseudo | RightWrite}, [AVARDEF]= {Pseudo | RightWrite},
// NOP is an internal no-op that also stands // NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode. // for USED and SET annotations, not the Intel opcode.
......
...@@ -762,7 +762,7 @@ enum as ...@@ -762,7 +762,7 @@ enum as
AFUNCDATA, AFUNCDATA,
APCDATA, APCDATA,
ACHECKNIL, ACHECKNIL,
AFATVARDEF, AVARDEF,
ALAST ALAST
}; };
......
...@@ -78,7 +78,7 @@ clearfat(Node *nl) ...@@ -78,7 +78,7 @@ clearfat(Node *nl)
if(componentgen(N, nl)) if(componentgen(N, nl))
return; return;
gfatvardef(nl); gvardef(nl);
c = w % 4; // bytes c = w % 4; // bytes
q = w / 4; // quads q = w / 4; // quads
......
...@@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = { ...@@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = {
[AUNDEF]= {Break}, [AUNDEF]= {Break},
[AUSEFIELD]= {OK}, [AUSEFIELD]= {OK},
[ACHECKNIL]= {LeftRead}, [ACHECKNIL]= {LeftRead},
[AFATVARDEF]= {Pseudo | RightWrite}, [AVARDEF]= {Pseudo | RightWrite},
// NOP is an internal no-op that also stands // NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode. // for USED and SET annotations, not the Intel opcode.
......
...@@ -579,7 +579,7 @@ enum as ...@@ -579,7 +579,7 @@ enum as
AFUNCDATA, AFUNCDATA,
APCDATA, APCDATA,
ACHECKNIL, ACHECKNIL,
AFATVARDEF, AVARDEF,
ALAST ALAST
}; };
......
...@@ -768,7 +768,7 @@ cgen_eface(Node *n, Node *res) ...@@ -768,7 +768,7 @@ cgen_eface(Node *n, Node *res)
*/ */
Node dst; Node dst;
gfatvardef(res); gvardef(res);
dst = *res; dst = *res;
dst.type = types[tptr]; dst.type = types[tptr];
dst.xoffset += widthptr; dst.xoffset += widthptr;
...@@ -797,7 +797,7 @@ cgen_slice(Node *n, Node *res) ...@@ -797,7 +797,7 @@ cgen_slice(Node *n, Node *res)
if(n->list->next->next) if(n->list->next->next)
offs = n->list->next->next->n; offs = n->list->next->next->n;
gfatvardef(res); gvardef(res);
// dst.len = hi [ - lo ] // dst.len = hi [ - lo ]
dst = *res; dst = *res;
......
...@@ -1494,7 +1494,7 @@ void gdatacomplex(Node*, Mpcplx*); ...@@ -1494,7 +1494,7 @@ void gdatacomplex(Node*, Mpcplx*);
void gdatastring(Node*, Strlit*); void gdatastring(Node*, Strlit*);
void ggloblnod(Node *nam); void ggloblnod(Node *nam);
void ggloblsym(Sym *s, int32 width, int dupok, int rodata); void ggloblsym(Sym *s, int32 width, int dupok, int rodata);
void gfatvardef(Node*); void gvardef(Node*);
Prog* gjmp(Prog*); Prog* gjmp(Prog*);
void gused(Node*); void gused(Node*);
void movelarge(NodeList*); void movelarge(NodeList*);
......
...@@ -32,28 +32,28 @@ makefuncdatasym(char *namefmt, int64 funcdatakind) ...@@ -32,28 +32,28 @@ makefuncdatasym(char *namefmt, int64 funcdatakind)
} }
void void
gfatvardef(Node *n) gvardef(Node *n)
{ {
if(n == N || !isfat(n->type)) if(n == N || !isfat(n->type))
fatal("gfatvardef: node is not fat"); fatal("gvardef: node is not fat");
switch(n->class) { switch(n->class) {
case PAUTO: case PAUTO:
case PPARAM: case PPARAM:
case PPARAMOUT: case PPARAMOUT:
gins(AFATVARDEF, N, n); gins(AVARDEF, N, n);
} }
} }
static void static void
removefatvardef(Prog *firstp) removevardef(Prog *firstp)
{ {
Prog *p; Prog *p;
for(p = firstp; p != P; p = p->link) { for(p = firstp; p != P; p = p->link) {
while(p->link != P && p->link->as == AFATVARDEF) while(p->link != P && p->link->as == AVARDEF)
p->link = p->link->link; p->link = p->link->link;
if(p->to.type == D_BRANCH) if(p->to.type == D_BRANCH)
while(p->to.u.branch != P && p->to.u.branch->as == AFATVARDEF) while(p->to.u.branch != P && p->to.u.branch->as == AVARDEF)
p->to.u.branch = p->to.u.branch->link; p->to.u.branch = p->to.u.branch->link;
} }
} }
...@@ -249,7 +249,7 @@ compile(Node *fn) ...@@ -249,7 +249,7 @@ compile(Node *fn)
frame(0); frame(0);
// Remove leftover instrumentation from the instruction stream. // Remove leftover instrumentation from the instruction stream.
removefatvardef(ptxt); removevardef(ptxt);
ret: ret:
lineno = lno; lineno = lno;
} }
......
...@@ -710,7 +710,7 @@ progeffects(Prog *prog, Array *vars, Bvec *uevar, Bvec *varkill, Bvec *avarinit) ...@@ -710,7 +710,7 @@ progeffects(Prog *prog, Array *vars, Bvec *uevar, Bvec *varkill, Bvec *avarinit)
if(info.flags & (LeftRead | LeftAddr)) if(info.flags & (LeftRead | LeftAddr))
bvset(uevar, pos); bvset(uevar, pos);
if(info.flags & LeftWrite) if(info.flags & LeftWrite)
if(from->node != nil && (!isfat(from->node->type) || prog->as == AFATVARDEF)) if(from->node != nil && (!isfat(from->node->type) || prog->as == AVARDEF))
bvset(varkill, pos); bvset(varkill, pos);
} }
} }
...@@ -736,7 +736,7 @@ Next: ...@@ -736,7 +736,7 @@ Next:
if(info.flags & (RightRead | RightAddr)) if(info.flags & (RightRead | RightAddr))
bvset(uevar, pos); bvset(uevar, pos);
if(info.flags & RightWrite) if(info.flags & RightWrite)
if(to->node != nil && (!isfat(to->node->type) || prog->as == AFATVARDEF)) if(to->node != nil && (!isfat(to->node->type) || prog->as == AVARDEF))
bvset(varkill, pos); bvset(varkill, pos);
} }
} }
......
...@@ -1518,7 +1518,7 @@ Optab optab[] = ...@@ -1518,7 +1518,7 @@ Optab optab[] =
{ AFUNCDATA, yfuncdata, Px, 0,0 }, { AFUNCDATA, yfuncdata, Px, 0,0 },
{ APCDATA, ypcdata, Px, 0,0 }, { APCDATA, ypcdata, Px, 0,0 },
{ ACHECKNIL }, { ACHECKNIL },
{ AFATVARDEF }, { AVARDEF },
{ AEND }, { AEND },
0 0
......
...@@ -1146,7 +1146,7 @@ static Optab optab[] = ...@@ -1146,7 +1146,7 @@ static Optab optab[] =
{ AFUNCDATA, yfuncdata, Px, 0,0 }, { AFUNCDATA, yfuncdata, Px, 0,0 },
{ APCDATA, ypcdata, Px, 0,0 }, { APCDATA, ypcdata, Px, 0,0 },
{ ACHECKNIL }, { ACHECKNIL },
{ AFATVARDEF }, { AVARDEF },
0 0
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment