if(REGARG >= 0)
o = reg[REGARG];
gargs(r, &nod, &nod1);
- gpcdata(PCDATA_ArgSize, curarg);
if(l->addable < INDEXED) {
reglcgen(&nod, l, Z);
gopcode(OFUNC, Z, Z, &nod);
regfree(&nod);
} else
gopcode(OFUNC, Z, Z, l);
- gpcdata(PCDATA_ArgSize, -1);
if(REGARG >= 0)
if(o != reg[REGARG])
reg[REGARG]--;
void splitclean(void);
Node* ncon(uint32 i);
void gtrack(Sym*);
-void gargsize(int32);
/*
* obj.c
void
ginscall(Node *f, int proc)
{
- int32 arg;
Prog *p;
Node n1, r, r1, con;
if(f->type != T)
setmaxarg(f->type);
- arg = -1;
- // Most functions have a fixed-size argument block, so traceback uses that during unwind.
- // Not all, though: there are some variadic functions in package runtime,
- // and for those we emit call-specific metadata recorded by caller.
- // Reflect generates functions with variable argsize (see reflect.methodValueCall/makeFuncStub),
- // so we do this for all indirect calls as well.
- if(f->type != T && (f->sym == S || (f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
- arg = f->type->argwid;
- if(proc == 1 || proc == 2)
- arg += 3*widthptr;
- }
-
- if(arg != -1)
- gargsize(arg);
-
switch(proc) {
default:
fatal("ginscall: bad proc %d", proc);
}
break;
}
-
- if(arg != -1)
- gargsize(-1);
}
/*
p->reg |= NOPTR;
}
-void
-gargsize(int32 size)
-{
- Node n1, n2;
-
- nodconst(&n1, types[TINT32], PCDATA_ArgSize);
- nodconst(&n2, types[TINT32], size);
- gins(APCDATA, &n1, &n2);
-}
-
void
ggloblsym(Sym *s, int32 width, int8 flags)
{
return;
}
gargs(r, &nod, &nod1);
- gpcdata(PCDATA_ArgSize, curarg);
if(l->addable < INDEXED) {
reglcgen(&nod, l, nn);
nod.op = OREGISTER;
regfree(&nod);
} else
gopcode(OFUNC, n->type, Z, l);
- gpcdata(PCDATA_ArgSize, -1);
if(REGARG >= 0 && reg[REGARG])
reg[REGARG]--;
regret(&nod, n, l->type, 1); // update maxarg if nothing else
- gpcdata(PCDATA_ArgSize, curarg);
- gpcdata(PCDATA_ArgSize, -1);
if(nn != Z)
gmove(&nod, nn);
if(nod.op == OREGISTER)
void afunclit(Addr*, Node*);
void nodfconst(Node*, Type*, Mpflt*);
void gtrack(Sym*);
-void gargsize(vlong);
void fixlargeoffset(Node *n);
/*
void
ginscall(Node *f, int proc)
{
- int32 arg;
Prog *p;
Node reg, con;
Node r1;
if(f->type != T)
setmaxarg(f->type);
- arg = -1;
- // Most functions have a fixed-size argument block, so traceback uses that during unwind.
- // Not all, though: there are some variadic functions in package runtime,
- // and for those we emit call-specific metadata recorded by caller.
- // Reflect generates functions with variable argsize (see reflect.methodValueCall/makeFuncStub),
- // so we do this for all indirect calls as well.
- if(f->type != T && (f->sym == S || (f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
- arg = f->type->argwid;
- if(proc == 1 || proc == 2)
- arg += 2*widthptr;
- }
-
- if(arg != -1)
- gargsize(arg);
-
switch(proc) {
default:
fatal("ginscall: bad proc %d", proc);
}
break;
}
-
- if(arg != -1)
- gargsize(-1);
}
/*
p->from.sym = linksym(s);
}
-void
-gargsize(vlong size)
-{
- Node n1, n2;
-
- nodconst(&n1, types[TINT32], PCDATA_ArgSize);
- nodconst(&n2, types[TINT32], size);
- gins(APCDATA, &n1, &n2);
-}
-
void
ggloblsym(Sym *s, int32 width, int8 flags)
{
return;
}
gargs(r, &nod, &nod1);
- gpcdata(PCDATA_ArgSize, curarg);
if(l->addable < INDEXED) {
reglcgen(&nod, l, nn);
nod.op = OREGISTER;
regfree(&nod);
} else
gopcode(OFUNC, n->type, Z, l);
- gpcdata(PCDATA_ArgSize, -1);
if(REGARG >= 0 && reg[REGARG])
reg[REGARG]--;
regret(&nod, n, l->type, 1); // update maxarg if nothing else
void splitclean(void);
void nswap(Node*, Node*);
void gtrack(Sym*);
-void gargsize(int32);
/*
* cplx.c
*/
if(f->type != T)
setmaxarg(f->type);
- arg = -1;
- // Most functions have a fixed-size argument block, so traceback uses that during unwind.
- // Not all, though: there are some variadic functions in package runtime,
- // and for those we emit call-specific metadata recorded by caller.
- // Reflect generates functions with variable argsize (see reflect.methodValueCall/makeFuncStub),
- // so we do this for all indirect calls as well.
- if(f->type != T && (f->sym == S || (f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
- arg = f->type->argwid;
- if(proc == 1 || proc == 2)
- arg += 2*widthptr;
- }
-
- if(arg != -1)
- gargsize(arg);
-
switch(proc) {
default:
fatal("ginscall: bad proc %d", proc);
}
break;
}
-
- if(arg != -1)
- gargsize(-1);
}
/*
p->from.scale |= NOPTR;
}
-void
-gargsize(int32 size)
-{
- Node n1, n2;
-
- nodconst(&n1, types[TINT32], PCDATA_ArgSize);
- nodconst(&n2, types[TINT32], size);
- gins(APCDATA, &n1, &n2);
-}
-
void
ggloblsym(Sym *s, int32 width, int8 flags)
{
//
// symtab.go also contains a copy of these constants.
-// TODO(rsc): Remove PCDATA_ArgSize, renumber StackMapIndex to 0.
-#define PCDATA_ArgSize 0 /* argument size at CALL instruction */
-#define PCDATA_StackMapIndex 1
+#define PCDATA_StackMapIndex 0
#define FUNCDATA_ArgsPointerMaps 0 /* garbage collector blocks */
#define FUNCDATA_LocalsPointerMaps 1
#define FUNCDATA_DeadValueMaps 2
-// TODO(rsc): Remove ARGSIZE.
-// To be used in assembly.
-#define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n
-
// Pseudo-assembly statements.
// GO_ARGS, GO_RESULTS_INITIALIZED, and NO_LOCAL_POINTERS are macros