Commit e5ba266e authored by Russ Cox's avatar Russ Cox

delete dregs: inarggen, genpanic, regret

R=ken
OCL=26916
CL=26918
parent 8971cf23
......@@ -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;
......
......@@ -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.
*/
......
......@@ -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);
......
......@@ -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.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment