1
0
mirror of https://github.com/golang/go synced 2024-11-21 16:14:42 -07:00

6g: fix build on Plan 9

src/cmd/6g/cgen.c
src/cmd/6g/gobj.c
src/cmd/6g/reg.c
. dropped unused assignments;
src/cmd/6g/gg.h
. added varargck pragmas;
src/cmd/6g/list.c
. adjusted print format for ulong casts;
src/cmd/6g/peep.c
. dropped redundant increment;

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4953049
This commit is contained in:
Lucio De Re 2011-08-29 09:34:59 -04:00 committed by Russ Cox
parent 65276933cd
commit 219c9e9c46
6 changed files with 3 additions and 8 deletions

View File

@ -729,9 +729,6 @@ bgen(Node *n, int true, Prog *to)
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)
@ -744,7 +741,6 @@ bgen(Node *n, int true, Prog *to)
patch(gins(AEND, N, N), to);
goto ret;
}
nl = N;
nr = N;
switch(n->op) {

View File

@ -153,3 +153,5 @@ void listinit(void);
void zaddr(Biobuf*, Addr*, int, int);
#pragma varargck type "D" Addr*
#pragma varargck type "lD" Addr*

View File

@ -623,7 +623,6 @@ out:
// 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);
}

View File

@ -133,7 +133,7 @@ Dconv(Fmt *fp)
if(fp->flags & FmtLong) {
d1 = a->offset & 0xffffffffLL;
d2 = (a->offset>>32) & 0xffffffffLL;
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), "$%lld", a->offset);

View File

@ -993,7 +993,6 @@ loop:
if(p->from.dval == p0->from.dval)
if(p->from.index == p0->from.index) {
excise(r);
t++;
goto loop;
}
break;

View File

@ -179,7 +179,6 @@ regopt(Prog *firstp)
r1 = R;
firstr = R;
lastr = R;
nvar = 0;
/*
* control flow is more complicated in generated go code