From: Dmitry Vyukov Date: Thu, 12 Feb 2015 19:31:27 +0000 (+0300) Subject: cmd/gc: restore amd64p32 hack for bucket size X-Git-Tag: go1.5beta1~2023 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=612d78d681dbaf1b561559d81a0922579664e370;p=gostls13.git cmd/gc: restore amd64p32 hack for bucket size This was accidentially removed in: https://go-review.googlesource.com/#/c/3508/8/src/cmd/gc/reflect.c Change-Id: I06dd5bb0cb3e2811bd4ef605d7a5225cfa033fe0 Reviewed-on: https://go-review.googlesource.com/4731 Reviewed-by: Keith Randall --- diff --git a/src/cmd/gc/reflect.c b/src/cmd/gc/reflect.c index 852485d13e..7f81e676f9 100644 --- a/src/cmd/gc/reflect.c +++ b/src/cmd/gc/reflect.c @@ -173,6 +173,11 @@ mapbucket(Type *t) field[nelem(field)-1]->down = T; dowidth(bucket); + // Pad to the native integer alignment. + // This is usually the same as widthptr; the exception (as usual) is amd64p32. + if(widthreg > widthptr) + bucket->width += widthreg - widthptr; + // See comment on hmap.overflow in ../../runtime/hashmap.go. if(!haspointers(t->type) && !haspointers(t->down)) bucket->haspointers = 1; // no pointers