diff options
author | Wei Xiao <wei.xiao@arm.com> | 2018-04-25 08:38:09 +0000 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2018-04-30 13:29:14 +0000 |
commit | bd8a88729c7ff12725834c4411ffe5d4b337d5de (patch) | |
tree | 3f249ae066617b1e04904a5ca37975360f2cbfe5 /src/cmd/compile/internal/ssa/gen/ARM64Ops.go | |
parent | b7f1777a709e575cb6aa03c25a976d06d36cb6a6 (diff) | |
download | go-bd8a88729c7ff12725834c4411ffe5d4b337d5de.tar.gz go-bd8a88729c7ff12725834c4411ffe5d4b337d5de.zip |
cmd/compile: intrinsify runtime.getcallerpc on arm64
Add a compiler intrinsic for getcallerpc on arm64 for better code generation.
Change-Id: I897e670a2b8ffa1a8c2fdc638f5b2c44bda26318
Reviewed-on: https://go-review.googlesource.com/109276
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/ARM64Ops.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/gen/ARM64Ops.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/ARM64Ops.go b/src/cmd/compile/internal/ssa/gen/ARM64Ops.go index 3f821e1ce9..b54de53f59 100644 --- a/src/cmd/compile/internal/ssa/gen/ARM64Ops.go +++ b/src/cmd/compile/internal/ssa/gen/ARM64Ops.go @@ -527,6 +527,12 @@ func init() { // LoweredGetCallerSP returns the SP of the caller of the current function. {name: "LoweredGetCallerSP", reg: gp01, rematerializeable: true}, + // LoweredGetCallerPC evaluates to the PC to which its "caller" will return. + // 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, rematerializeable: true}, + // Constant flag values. For any comparison, there are 5 possible // outcomes: the three from the signed total order (<,==,>) and the // three from the unsigned total order. The == cases overlap. |