9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] stopgap for vlong bug
@ 2009-09-15 21:20 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2009-09-15 21:20 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-15 21:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 21:20 [9fans] stopgap for vlong bug erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).