Commit e5bd12ea authored by Ken Thompson's avatar Ken Thompson

bug right shifting 64 bits

by a variable that equals 32

R=rsc
CC=golang-dev
https://golang.org/cl/2645042
parent a89b0ed7
......@@ -439,12 +439,12 @@ olsh_break:
p3 = gbranch(ABLO, T);
// shift == 32
p1 = gins(AMOVW, &bh, &al);
p1->scond = C_SCOND_EQ;
if(bh.type->etype == TINT32)
p1 = gshift(AMOVW, &bh, SHIFT_AR, 31, &ah);
else
p1 = gins(AEOR, &al, &al);
p1->scond = C_SCOND_EQ;
p1 = gins(AMOVW, &bh, &al);
p1 = gins(AEOR, &ah, &ah);
p1->scond = C_SCOND_EQ;
p4 = gbranch(ABEQ, T);
......
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