64-bit fixes. [jmk] --rw-rw-r-- M 107020 glenda sys 6044 Nov 19 20:48 sys/src/cmd/1c/gc.h /n/sourcesdump/2005/1119/plan9/sys/src/cmd/1c/gc.h:318,323 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/1c/gc.h:318,324 void fpbranch(void); void patch(Prog*, long); void gpseudo(int, Sym*, int, long); + void gpseudotree(int, Sym*, Node*); void indx(Node*); void bcomplex(Node*); [jmk] --rw-rw-r-- M 107020 glenda sys 15407 Nov 19 20:49 sys/src/cmd/1c/swt.c /n/sourcesdump/2005/1119/plan9/sys/src/cmd/1c/swt.c:882,888 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/1c/swt.c:882,888 p->from.displace = 4; return; } - gpseudo(ADATA, s, D_TREE, (long)a); + gpseudotree(ADATA, s, a); p->from.offset += o; p->from.displace = w; } [jmk] --rw-rw-r-- M 107020 glenda sys 17123 Nov 19 20:49 sys/src/cmd/1c/txt.c /n/sourcesdump/2005/1119/plan9/sys/src/cmd/1c/txt.c:638,647 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/1c/txt.c:638,647 } else { p->from.type = gf; if(gf == D_CONST) { - p->from.offset = (long)f; + p->from.offset = (long)(uintptr)f; if(typefd[i]) { p->from.type = D_FCONST; - p->from.dval = (long)f; + p->from.dval = (long)(uintptr)f; } } } /n/sourcesdump/2005/1119/plan9/sys/src/cmd/1c/txt.c:651,657 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/1c/txt.c:651,657 } else { p->to.type = gt; if(gt == D_CONST) - p->to.offset = (long)t; + p->to.offset = (long)(uintptr)t; } if(o == OBIT) { p->from.field = f->type->nbits; /n/sourcesdump/2005/1119/plan9/sys/src/cmd/1c/txt.c:803,813 - /n/sourcesdump/2005/1120/plan9/sys/src/cmd/1c/txt.c:803,825 if(a == ADATA) pc--; p->as = a; - if(g != D_TREE) { - p->to.type = g; - p->to.offset = v; - } else - naddr((Node*)v, &p->to, D_NONE); + p->to.type = g; + p->to.offset = v; + p->from.sym = s; + p->from.type = D_EXTERN; + if(s->class == CSTATIC) + p->from.type = D_STATIC; + } + + void + gpseudotree(int a, Sym *s, Node *n) + { + + nextpc(); + if(a == ADATA) + pc--; + p->as = a; + naddr(n, &p->to, D_NONE); p->from.sym = s; p->from.type = D_EXTERN; if(s->class == CSTATIC)