Commit 25bde37a authored by Russ Cox's avatar Russ Cox

[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
parent 80e76e27
......@@ -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];
......
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