aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-09-11 12:07:44 -0400
committerCherry Zhang <cherryyz@google.com>2020-09-11 12:07:44 -0400
commit3ab22052fbe784088cf8e4edf686707c54f51cf2 (patch)
tree98ccab5799729e3f7978e2ee71eb0f81e5e6ac8c /src/runtime/runtime2.go
parent5402d40d5b041399392b29e4543f5fc4506197bd (diff)
parentb459bc8152210c14b66e23351690ff774cd68d2c (diff)
downloadgo-3ab22052fbe784088cf8e4edf686707c54f51cf2.tar.gz
go-3ab22052fbe784088cf8e4edf686707c54f51cf2.zip
[dev.link] all: merge branch 'master' into dev.link
Clean merge. Change-Id: Ib773b0bc00fd99d494f9331c3613bcc8285e48e3
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index eba68da624..047b87def1 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -329,7 +329,7 @@ type gobuf struct {
ctxt unsafe.Pointer
ret sys.Uintreg
lr uintptr
- bp uintptr // for GOEXPERIMENT=framepointer
+ bp uintptr // for framepointer-enabled architectures
}
// sudog represents a g in a wait list, such as for sending/receiving
@@ -910,15 +910,12 @@ type _defer struct {
// A _panic holds information about an active panic.
//
-// This is marked go:notinheap because _panic values must only ever
-// live on the stack.
+// A _panic value must only ever live on the stack.
//
// The argp and link fields are stack pointers, but don't need special
// handling during stack growth: because they are pointer-typed and
// _panic values only live on the stack, regular stack pointer
// adjustment takes care of them.
-//
-//go:notinheap
type _panic struct {
argp unsafe.Pointer // pointer to arguments of deferred call run during panic; cannot move - known to liblink
arg interface{} // argument to panic
@@ -1050,8 +1047,7 @@ var (
isIntel bool
lfenceBeforeRdtsc bool
- goarm uint8 // set by cmd/link on arm systems
- framepointer_enabled bool // set by cmd/link
+ goarm uint8 // set by cmd/link on arm systems
)
// Set by the linker so the runtime can determine the buildmode.
@@ -1059,3 +1055,6 @@ var (
islibrary bool // -buildmode=c-shared
isarchive bool // -buildmode=c-archive
)
+
+// Must agree with cmd/internal/objabi.Framepointer_enabled.
+const framepointer_enabled = GOARCH == "amd64" || GOARCH == "arm64" && (GOOS == "linux" || GOOS == "darwin")