Commit fd922c87 authored by Ken Thompson's avatar Ken Thompson

shift bug

R=r
OCL=18166
CL=18166
parent c1198b9b
......@@ -1047,12 +1047,15 @@ cgen_shift(int op, Node *nl, Node *nr, Node *res)
regalloc(&n1, nr->type, &n1);
// clean out the CL register
if(rcl && !samereg(res, &n1)) {
if(rcl) {
regalloc(&n2, types[TINT64], N);
gins(AMOVQ, &n1, &n2);
regfree(&n1);
reg[D_CX] = 0;
if(samereg(res, &n1))
cgen_shift(op, nl, nr, &n2);
else
cgen_shift(op, nl, nr, res);
reg[D_CX] = rcl;
......
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