;
}
-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;
ptxt = gins(ATEXT, curfn->nname, &nod1);
afunclit(&ptxt->from);
-// inarggen();
-
ginit();
gen(curfn->enter);
gen(curfn->nbody);
n = n->right;
goto loop;
- case OPANIC:
- genpanic();
- break;
-
case OCASE:
case OFALL:
case OXCASE:
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.
*/
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*);
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);
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);
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.
*/