Commit e372be9e authored by Ken Thompson's avatar Ken Thompson

code gen bug in ++ and --

SVN=121476
parent 17ee7818
...@@ -694,16 +694,14 @@ cgen_asop(Node *nl, Node *nr, int op) ...@@ -694,16 +694,14 @@ cgen_asop(Node *nl, Node *nr, int op)
regalloc(&n1, nl->type, N); regalloc(&n1, nl->type, N);
if(nl->addable) { if(nl->addable) {
cgen(nr, &n1); cgen(nr, &n1);
gins(a, nl, &n1); gins(a, &n1, nl);
gmove(&n1, nl);
regfree(&n1); regfree(&n1);
return; return;
} }
igen(nl, &n2, N); igen(nl, &n2, N);
cgen(nr, &n1); cgen(nr, &n1);
gins(a, &n2, &n1); gins(a, &n1, &n2);
gmove(&n1, &n2);
regfree(&n1); regfree(&n1);
regfree(&n2); regfree(&n2);
} }
......
...@@ -208,7 +208,6 @@ enum ...@@ -208,7 +208,6 @@ enum
OEQ, ONE, OLT, OLE, OGE, OGT, OEQ, ONE, OLT, OLE, OGE, OGT,
OADD, OSUB, OOR, OXOR, OADD, OSUB, OOR, OXOR,
OMUL, ODIV, OMOD, OLSH, ORSH, OAND, OMUL, ODIV, OMOD, OLSH, ORSH, OAND,
ODEC, OINC,
OLEN, OLEN,
OFUNC, OFUNC,
OLABEL, OLABEL,
......
...@@ -606,8 +606,6 @@ opnames[] = ...@@ -606,8 +606,6 @@ opnames[] =
[OOROR] = "OROR", [OOROR] = "OROR",
[OOR] = "OR", [OOR] = "OR",
[OPLUS] = "PLUS", [OPLUS] = "PLUS",
[ODEC] = "DEC",
[OINC] = "INC",
[OREGISTER] = "REGISTER", [OREGISTER] = "REGISTER",
[OINDREG] = "INDREG", [OINDREG] = "INDREG",
[OSEND] = "SEND", [OSEND] = "SEND",
......
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