From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Tue, 15 Sep 2009 17:20:36 -0400 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] stopgap for vlong bug Topicbox-Message-UUID: 6ec26d6a-ead5-11e9-9d60-3106f5b1d025 reported here http://9fans.net/narchive/2009/08/1042 i haven't had much time to even look at this problem. this will at least abort the compile, rather than miscompile. so it's marginally better than nothing. the warning is just documentation of the problem. i recompiled everything with this patch and didn't see it trip (except in my lucky code), so i wonder if there is always a problem if t->right->reg != D_DX holds. /n/sources/plan9//sys/src/cmd/8c/cgen64.c:2293,2298 - cgen64.c:2293,2300 evacaxdx(l); } } + if(l->op == OSUB && l->right != Z && l->right->op == OCAST) + warn(n, "likely vlong bug"); t = regpair(Z, n); sugen(r, t, 8); r = t; /n/sources/plan9//sys/src/cmd/8c/cgen64.c:2336,2341 - cgen64.c:2338,2344 zapreg(t->left); } if(t->right->reg != D_DX) { + fatal(Z, "vlong double-spill botch"); d = &nod4; regsalloc(d, t->right); gmove(&nod2, d); - erik