mirror of
https://github.com/golang/go
synced 2024-11-22 01:34:41 -07:00
code gen bug in ++ and --
SVN=121476
This commit is contained in:
parent
17ee7818de
commit
e372be9e76
@ -694,16 +694,14 @@ cgen_asop(Node *nl, Node *nr, int op)
|
||||
regalloc(&n1, nl->type, N);
|
||||
if(nl->addable) {
|
||||
cgen(nr, &n1);
|
||||
gins(a, nl, &n1);
|
||||
gmove(&n1, nl);
|
||||
gins(a, &n1, nl);
|
||||
regfree(&n1);
|
||||
return;
|
||||
}
|
||||
|
||||
igen(nl, &n2, N);
|
||||
cgen(nr, &n1);
|
||||
gins(a, &n2, &n1);
|
||||
gmove(&n1, &n2);
|
||||
gins(a, &n1, &n2);
|
||||
regfree(&n1);
|
||||
regfree(&n2);
|
||||
}
|
||||
|
@ -208,7 +208,6 @@ enum
|
||||
OEQ, ONE, OLT, OLE, OGE, OGT,
|
||||
OADD, OSUB, OOR, OXOR,
|
||||
OMUL, ODIV, OMOD, OLSH, ORSH, OAND,
|
||||
ODEC, OINC,
|
||||
OLEN,
|
||||
OFUNC,
|
||||
OLABEL,
|
||||
|
@ -606,8 +606,6 @@ opnames[] =
|
||||
[OOROR] = "OROR",
|
||||
[OOR] = "OR",
|
||||
[OPLUS] = "PLUS",
|
||||
[ODEC] = "DEC",
|
||||
[OINC] = "INC",
|
||||
[OREGISTER] = "REGISTER",
|
||||
[OINDREG] = "INDREG",
|
||||
[OSEND] = "SEND",
|
||||
|
Loading…
Reference in New Issue
Block a user