1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:34:42 -07:00

bug right shifting 64 bits

by a variable that equals 32

R=rsc
CC=golang-dev
https://golang.org/cl/2645042
This commit is contained in:
Ken Thompson 2010-10-21 18:15:00 -07:00
parent a89b0ed7e4
commit e5bd12ea90

View File

@ -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);