An embedded trampoline is a function that exists to marshal
a receiver of type *S to a receiver of type *T when T is an
embedded field in S.
Embedded trampolines are generated by a special path through
the compiler and are not subject to the general analysis and
annotation done to functions. Their effects must be provided
explicitly.
R=golang-dev, r, daniel.morsing, minux.ma
CC=golang-dev
https://golang.org/cl/
9874043
p->from.name = D_EXTERN;
p->from.sym = newnam;
p->to.type = D_CONST2;
- p->reg = 7;
- p->to.offset2 = 0;
+ p->to.offset = 0; // stack size
+ p->to.offset2 = rnd(method->type->argwid, widthptr); // argument size
+ p->reg = 7; // textflag
p->to.reg = NREG;
//print("1. %P\n", p);
p->from.type = D_EXTERN;
p->from.sym = newnam;
p->to.type = D_CONST;
- p->to.offset = 0;
- p->from.scale = 7;
+ p->to.offset = 0; // stack size
+ p->to.offset |= rnd(method->type->argwid, widthptr) << 32; // argument size
+ p->from.scale = 7; // textflag
//print("1. %P\n", p);
mov = AMOVQ;
p->from.type = D_EXTERN;
p->from.sym = newnam;
p->to.type = D_CONST;
- p->to.offset = 0;
- p->from.scale = 7;
+ p->to.offset = 0; // stack skize
+ p->to.offset2 = rnd(method->type->argwid, widthptr); // argument size
+ p->from.scale = 7; // textflag
//print("1. %P\n", p);
mov = AMOVL;