Commit d2472eb8 authored by Ken Thompson's avatar Ken Thompson

>>= and <<= shift bug

R=r
OCL=18322
CL=18322
parent 2fef4c71
...@@ -752,12 +752,12 @@ cgen_asop(Node *n) ...@@ -752,12 +752,12 @@ cgen_asop(Node *n)
} }
if(nr->ullman > nl->ullman) { if(nr->ullman > nl->ullman) {
regalloc(&n2, nl->type, N); regalloc(&n2, nr->type, N);
cgen(nr, &n2); cgen(nr, &n2);
igen(nl, &n1, N); igen(nl, &n1, N);
} else { } else {
igen(nl, &n1, N); igen(nl, &n1, N);
regalloc(&n2, nl->type, N); regalloc(&n2, nr->type, N);
cgen(nr, &n2); cgen(nr, &n2);
} }
...@@ -766,7 +766,7 @@ cgen_asop(Node *n) ...@@ -766,7 +766,7 @@ cgen_asop(Node *n)
n3.right = &n2; n3.right = &n2;
n3.op = n->etype; n3.op = n->etype;
regalloc(&n4, nr->type, N); regalloc(&n4, nl->type, N);
cgen(&n3, &n4); cgen(&n3, &n4);
gmove(&n4, &n1); gmove(&n4, &n1);
......
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