From: Ken Thompson Date: Wed, 12 Nov 2008 02:15:36 +0000 (-0800) Subject: 6c bug with large constants X-Git-Tag: weekly.2009-11-06~2746 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=902a4d5f2913d1dafdd7277bdfd64e3316979ca6;p=gostls13.git 6c bug with large constants R=r OCL=19056 CL=19056 --- diff --git a/src/cmd/6c/txt.c b/src/cmd/6c/txt.c index c7e52102f3..595e102fcd 100644 --- a/src/cmd/6c/txt.c +++ b/src/cmd/6c/txt.c @@ -642,6 +642,17 @@ gmove(Node *f, Node *t) /* * load */ + if(ft == TVLONG || ft == TUVLONG) + if(f->op == OCONST) + if(f->vconst > 0x7fffffffLL || f->vconst < -0x7fffffffLL) + if(t->op != OREGISTER) { + regalloc(&nod, f, Z); + gmove(f, &nod); + gmove(&nod, t); + regfree(&nod); + return; + } + if(f->op == ONAME || f->op == OINDREG || f->op == OIND || f->op == OINDEX) switch(ft) {