mirror of https://github.com/golang/go.git
[dev.power64] cmd/9c: fix constant truncation in optimizer
This is what broke getpopcount, but that code had it coming. LGTM=minux R=minux CC=golang-codereviews https://golang.org/cl/130000044
This commit is contained in:
parent
80e76e272a
commit
25bde37af4
|
|
@ -558,7 +558,7 @@ mkvar(Addr *a, int docon)
|
|||
{
|
||||
Var *v;
|
||||
int i, t, n, et, z;
|
||||
int32 o;
|
||||
int64 o;
|
||||
Bits bit;
|
||||
LSym *s;
|
||||
|
||||
|
|
@ -617,6 +617,8 @@ out:
|
|||
for(z=0; z<BITS; z++)
|
||||
addrs.b[z] |= bit.b[z];
|
||||
if(t == D_CONST) {
|
||||
if((int32)o != o)
|
||||
v->etype = TVLONG;
|
||||
if(s == nil) {
|
||||
for(z=0; z<BITS; z++)
|
||||
consts.b[z] |= bit.b[z];
|
||||
|
|
|
|||
Loading…
Reference in New Issue