mirror of
https://github.com/golang/go
synced 2024-11-24 07:20:02 -07:00
cmd/compile: mark LoweredGetCallerPC rematerializeable
The caller's PC is always available in the frame. We can just load it when needed, no need to spill. Change-Id: I9c0a525903e574bb4eec9fe53cbeb8c64321166a Reviewed-on: https://go-review.googlesource.com/70710 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
d1bbdbe760
commit
e01eac371a
@ -444,7 +444,7 @@ func init() {
|
||||
// I.e., if f calls g "calls" getcallerpc,
|
||||
// the result should be the PC within f that g will return to.
|
||||
// See runtime/stubs.go for a more detailed discussion.
|
||||
{name: "LoweredGetCallerPC", reg: gp01},
|
||||
{name: "LoweredGetCallerPC", reg: gp01, rematerializeable: true},
|
||||
// LoweredGetCallerSP returns the SP of the caller of the current function.
|
||||
{name: "LoweredGetCallerSP", reg: gp01, rematerializeable: true},
|
||||
//arg0=ptr,arg1=mem, returns void. Faults if ptr is nil.
|
||||
|
@ -555,7 +555,7 @@ func init() {
|
||||
// I.e., if f calls g "calls" getcallerpc,
|
||||
// the result should be the PC within f that g will return to.
|
||||
// See runtime/stubs.go for a more detailed discussion.
|
||||
{name: "LoweredGetCallerPC", reg: gp01},
|
||||
{name: "LoweredGetCallerPC", reg: gp01, rematerializeable: true},
|
||||
// LoweredGetCallerSP returns the SP of the caller of the current function.
|
||||
{name: "LoweredGetCallerSP", reg: gp01, rematerializeable: true},
|
||||
//arg0=ptr,arg1=mem, returns void. Faults if ptr is nil.
|
||||
|
@ -4341,8 +4341,9 @@ var opcodeTable = [...]opInfo{
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "LoweredGetCallerPC",
|
||||
argLen: 0,
|
||||
name: "LoweredGetCallerPC",
|
||||
argLen: 0,
|
||||
rematerializeable: true,
|
||||
reg: regInfo{
|
||||
outputs: []outputInfo{
|
||||
{0, 239}, // AX CX DX BX BP SI DI
|
||||
@ -8118,8 +8119,9 @@ var opcodeTable = [...]opInfo{
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "LoweredGetCallerPC",
|
||||
argLen: 0,
|
||||
name: "LoweredGetCallerPC",
|
||||
argLen: 0,
|
||||
rematerializeable: true,
|
||||
reg: regInfo{
|
||||
outputs: []outputInfo{
|
||||
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
|
||||
|
Loading…
Reference in New Issue
Block a user