mirror of
https://github.com/golang/go
synced 2024-11-22 22:10:03 -07:00
cmd/5g, cmd/6g, cmd/8g: provide embedded trampolines with argument size information
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
This commit is contained in:
parent
252161cadc
commit
31be5deae4
@ -548,8 +548,9 @@ out:
|
||||
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);
|
||||
|
||||
|
@ -528,8 +528,9 @@ out:
|
||||
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;
|
||||
|
@ -534,8 +534,9 @@ out:
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user