Commit 31be5dea authored by Carl Shapiro's avatar Carl Shapiro

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
parent 252161ca
...@@ -548,8 +548,9 @@ out: ...@@ -548,8 +548,9 @@ out:
p->from.name = D_EXTERN; p->from.name = D_EXTERN;
p->from.sym = newnam; p->from.sym = newnam;
p->to.type = D_CONST2; p->to.type = D_CONST2;
p->reg = 7; p->to.offset = 0; // stack size
p->to.offset2 = 0; p->to.offset2 = rnd(method->type->argwid, widthptr); // argument size
p->reg = 7; // textflag
p->to.reg = NREG; p->to.reg = NREG;
//print("1. %P\n", p); //print("1. %P\n", p);
......
...@@ -528,8 +528,9 @@ out: ...@@ -528,8 +528,9 @@ out:
p->from.type = D_EXTERN; p->from.type = D_EXTERN;
p->from.sym = newnam; p->from.sym = newnam;
p->to.type = D_CONST; p->to.type = D_CONST;
p->to.offset = 0; p->to.offset = 0; // stack size
p->from.scale = 7; p->to.offset |= rnd(method->type->argwid, widthptr) << 32; // argument size
p->from.scale = 7; // textflag
//print("1. %P\n", p); //print("1. %P\n", p);
mov = AMOVQ; mov = AMOVQ;
......
...@@ -534,8 +534,9 @@ out: ...@@ -534,8 +534,9 @@ out:
p->from.type = D_EXTERN; p->from.type = D_EXTERN;
p->from.sym = newnam; p->from.sym = newnam;
p->to.type = D_CONST; p->to.type = D_CONST;
p->to.offset = 0; p->to.offset = 0; // stack skize
p->from.scale = 7; p->to.offset2 = rnd(method->type->argwid, widthptr); // argument size
p->from.scale = 7; // textflag
//print("1. %P\n", p); //print("1. %P\n", p);
mov = AMOVL; mov = AMOVL;
......
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