mirror of
https://github.com/golang/go.git
synced 2025-05-31 04:02:58 +00:00
tiny naming cleanup
R=rsc APPROVED=rsc DELTA=17 (0 added, 0 deleted, 17 changed) OCL=31503 CL=31579
This commit is contained in:
parent
7258bac6e8
commit
0e2cce70cb
@ -820,7 +820,7 @@ stkof(Node *n)
|
|||||||
void
|
void
|
||||||
sgen(Node *n, Node *res, int32 w)
|
sgen(Node *n, Node *res, int32 w)
|
||||||
{
|
{
|
||||||
Node nodl, nodr, ndat, nend;
|
Node dst, src, tmp, nend;
|
||||||
int32 c, q, odst, osrc;
|
int32 c, q, odst, osrc;
|
||||||
Prog *p;
|
Prog *p;
|
||||||
|
|
||||||
@ -842,16 +842,16 @@ sgen(Node *n, Node *res, int32 w)
|
|||||||
osrc = stkof(n);
|
osrc = stkof(n);
|
||||||
odst = stkof(res);
|
odst = stkof(res);
|
||||||
|
|
||||||
regalloc(&nodl, types[tptr], N);
|
regalloc(&dst, types[tptr], N);
|
||||||
regalloc(&nodr, types[tptr], N);
|
regalloc(&src, types[tptr], N);
|
||||||
regalloc(&ndat, types[TUINT32], N);
|
regalloc(&tmp, types[TUINT32], N);
|
||||||
|
|
||||||
if(n->ullman >= res->ullman) {
|
if(n->ullman >= res->ullman) {
|
||||||
agen(n, &nodr);
|
agen(n, &src);
|
||||||
agen(res, &nodl);
|
agen(res, &dst);
|
||||||
} else {
|
} else {
|
||||||
agen(res, &nodl);
|
agen(res, &dst);
|
||||||
agen(n, &nodr);
|
agen(n, &src);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = w % 4; // bytes
|
c = w % 4; // bytes
|
||||||
@ -890,33 +890,33 @@ sgen(Node *n, Node *res, int32 w)
|
|||||||
// normal direction
|
// normal direction
|
||||||
if(q >= 4) {
|
if(q >= 4) {
|
||||||
regalloc(&nend, types[TUINT32], N);
|
regalloc(&nend, types[TUINT32], N);
|
||||||
p = gins(AMOVW, &nodr, &nend);
|
p = gins(AMOVW, &src, &nend);
|
||||||
p->from.type = D_CONST;
|
p->from.type = D_CONST;
|
||||||
p->from.offset = q;
|
p->from.offset = q;
|
||||||
|
|
||||||
p = gins(AMOVW, &nodr, &ndat);
|
p = gins(AMOVW, &src, &tmp);
|
||||||
p->from.type = D_OREG;
|
p->from.type = D_OREG;
|
||||||
p->from.offset = 4;
|
p->from.offset = 4;
|
||||||
p->scond |= C_PBIT;
|
p->scond |= C_PBIT;
|
||||||
|
|
||||||
p = gins(AMOVW, &ndat, &nodl);
|
p = gins(AMOVW, &tmp, &dst);
|
||||||
p->to.type = D_OREG;
|
p->to.type = D_OREG;
|
||||||
p->to.offset = 4;
|
p->to.offset = 4;
|
||||||
p->scond |= C_PBIT;
|
p->scond |= C_PBIT;
|
||||||
|
|
||||||
gins(ACMP, &nodr, &nend);
|
gins(ACMP, &src, &nend);
|
||||||
fatal("sgen loop not implemented");
|
fatal("sgen loop not implemented");
|
||||||
p = gins(ABNE, N, N);
|
p = gins(ABNE, N, N);
|
||||||
// TODO(PC offset)
|
// TODO(PC offset)
|
||||||
regfree(&nend);
|
regfree(&nend);
|
||||||
} else
|
} else
|
||||||
while(q > 0) {
|
while(q > 0) {
|
||||||
p = gins(AMOVW, &nodr, &ndat);
|
p = gins(AMOVW, &src, &tmp);
|
||||||
p->from.type = D_OREG;
|
p->from.type = D_OREG;
|
||||||
p->from.offset = 4;
|
p->from.offset = 4;
|
||||||
p->scond |= C_PBIT;
|
p->scond |= C_PBIT;
|
||||||
|
|
||||||
p = gins(AMOVW, &ndat, &nodl);
|
p = gins(AMOVW, &tmp, &dst);
|
||||||
p->to.type = D_OREG;
|
p->to.type = D_OREG;
|
||||||
p->to.offset = 4;
|
p->to.offset = 4;
|
||||||
p->scond |= C_PBIT;
|
p->scond |= C_PBIT;
|
||||||
@ -936,7 +936,7 @@ sgen(Node *n, Node *res, int32 w)
|
|||||||
// c--;
|
// c--;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
regfree(&nodl);
|
regfree(&dst);
|
||||||
regfree(&nodr);
|
regfree(&src);
|
||||||
regfree(&ndat);
|
regfree(&tmp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user