8g/cgen.c:
8g/gobj.c
. dropped unnecessary assignments;
8g/gg.h
. added varargckk pragmas;
8g/ggen.c
. dropped duplicate assignment;
8g/gsubr.c
. adjusted format in print statement;
. dropped unnecessary assignment;
. replaced GCC's _builtin_return_address(0) with Plan 9's
getcallerpc(&n) which is defined as a macro in <u.h>;
8g/list.c
. adjusted format in snprint statement;
8g/opt.h
. added varargck pragma (Adr*) that is specific for the invoking
modules;
8g/peep.c
. dropped unnecessary incrementation;
R=rsc
CC=golang-dev
https://golang.org/cl/
4974044
break;
case ODOT:
- t = nl->type;
agen(nl, res);
if(n->xoffset != 0) {
nodconst(&n1, types[tptr], n->xoffset);
if(n->ninit != nil)
genlist(n->ninit);
- nl = n->left;
- nr = n->right;
-
if(n->type == T) {
convlit(&n, types[TBOOL]);
if(n->type == T)
patch(gins(AEND, N, N), to);
return;
}
- nl = N;
nr = N;
switch(n->op) {
void zaddr(Biobuf*, Addr*, int, int);
+#pragma varargck type "D" Addr*
+#pragma varargck type "lD" Addr*
if(nr->ullman >= nl->ullman || nl->addable) {
mgen(nr, &n2, N);
nr = &n2;
- nr = &n2;
} else {
tempname(&n2, nr->type);
cgen(nr, &n2);
// but 6l has a bug, and it can't handle
// JMP instructions too close to the top of
// a new function.
- p = pc;
gins(ANOP, N, N);
}
fprint(2, "registers allocated at\n");
for(i=D_AX; i<=D_DI; i++)
- fprint(2, "\t%R\t%#ux\n", i, regpc[i]);
+ fprint(2, "\t%R\t%#lux\n", i, regpc[i]);
yyerror("out of fixed registers");
goto err;
goto out;
}
yyerror("regalloc: unknown type %T", t);
- i = 0;
err:
nodreg(n, t, 0);
if (i == D_SP)
print("alloc SP\n");
if(reg[i] == 0) {
- regpc[i] = (ulong)__builtin_return_address(0);
+ regpc[i] = (ulong)getcallerpc(&n);
if(i == D_AX || i == D_CX || i == D_DX || i == D_SP) {
dump("regalloc-o", o);
fatal("regalloc %R", i);
if(fp->flags & FmtLong) {
d1 = a->offset;
d2 = a->offset2;
- snprint(str, sizeof(str), "$%ud-%ud", (ulong)d1, (ulong)d2);
+ snprint(str, sizeof(str), "$%lud-%lud", (ulong)d1, (ulong)d2);
break;
}
snprint(str, sizeof(str), "$%d", a->offset);
int32 FtoB(int);
int BtoR(int32);
int BtoF(int32);
+
+#pragma varargck type "D" Adr*
if(p->from.dval == p0->from.dval)
if(p->from.index == p0->from.index) {
excise(r);
- t++;
goto loop;
}
break;