1
0
mirror of https://github.com/golang/go synced 2024-11-26 08:27:56 -07:00

delete dregs: inarggen, genpanic, regret

R=ken
OCL=26916
CL=26918
This commit is contained in:
Russ Cox 2009-03-30 17:15:54 -07:00
parent 8971cf2354
commit e5ba266e93
4 changed files with 0 additions and 47 deletions

View File

@ -574,16 +574,6 @@ ret:
;
}
vlong
fieldoffset(Type *t, Node *n)
{
if(t->etype != TSTRUCT)
fatal("fieldoffset: not struct %lT", t);
if(n->op != ONAME)
fatal("fieldoffset: not field name %N", n);
return 0;
}
/*
* generate:
* newreg = &n;

View File

@ -79,8 +79,6 @@ compile(Node *fn)
ptxt = gins(ATEXT, curfn->nname, &nod1);
afunclit(&ptxt->from);
// inarggen();
ginit();
gen(curfn->enter);
gen(curfn->nbody);
@ -190,10 +188,6 @@ loop:
n = n->right;
goto loop;
case OPANIC:
genpanic();
break;
case OCASE:
case OFALL:
case OXCASE:
@ -375,26 +369,6 @@ ret:
lineno = lno;
}
void
inarggen(void)
{
fatal("inarggen");
}
void
genpanic(void)
{
Node n1, n2;
Prog *p;
nodconst(&n1, types[TINT64], 0xf0);
nodreg(&n2, types[TINT64], D_AX);
gins(AMOVL, &n1, &n2);
p = pc;
gins(AMOVQ, &n2, N);
p->to.type = D_INDIR+D_AX;
}
/*
* compute total size of f's in/out arguments.
*/

View File

@ -119,7 +119,6 @@ void compile(Node*);
void proglist(void);
void gen(Node*);
Node* lookdot(Node*, Node*, int);
void inarggen(void);
void cgen_as(Node*, Node*);
void cgen_asop(Node*);
void cgen_ret(Node*);
@ -132,7 +131,6 @@ void cgen_div(int, Node*, Node*, Node*);
void cgen_bmul(int, Node*, Node*, Node*);
void cgen_shift(int, Node*, Node*, Node*);
void cgen_dcl(Node*);
void genpanic(void);
int needconvert(Type*, Type*);
void genconv(Type*, Type*);
void allocparams(void);
@ -178,7 +176,6 @@ void ginit(void);
void gclean(void);
void regalloc(Node*, Type*, Node*);
void regfree(Node*);
void regret(Node*, Type*);
Node* nodarg(Type*, int);
void nodreg(Node*, Type*, int);
void nodindreg(Node*, Type*, int);

View File

@ -239,14 +239,6 @@ regfree(Node *n)
reg[i]--;
}
void
regret(Node *n, Type *t)
{
if(t == T)
fatal("regret: t nil");
fatal("regret");
}
/*
* initialize n to be register r of type t.
*/