aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_riscv64.go
diff options
context:
space:
mode:
authorJoel Sing <joel@sing.id.au>2019-11-04 04:58:37 +1100
committerJoel Sing <joel@sing.id.au>2020-01-19 14:04:09 +0000
commit8e0be05ec7c369387c0ed3c9cf37968c6d3afbbd (patch)
treea52a3963edf41ea1960b0c018d047ecfe0756460 /src/runtime/sys_riscv64.go
parentcbaa666682386fe5350bf87d7d70171704c90fe4 (diff)
downloadgo-8e0be05ec7c369387c0ed3c9cf37968c6d3afbbd.tar.gz
go-8e0be05ec7c369387c0ed3c9cf37968c6d3afbbd.zip
runtime: add support for linux/riscv64
Based on riscv-go port. Updates #27532 Change-Id: If522807a382130be3c8d40f4b4c1131d1de7c9e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/204632 Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/sys_riscv64.go')
-rw-r--r--src/runtime/sys_riscv64.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/runtime/sys_riscv64.go b/src/runtime/sys_riscv64.go
new file mode 100644
index 0000000000..e710840819
--- /dev/null
+++ b/src/runtime/sys_riscv64.go
@@ -0,0 +1,18 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package runtime
+
+import "unsafe"
+
+// adjust Gobuf as if it executed a call to fn with context ctxt
+// and then did an immediate Gosave.
+func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
+ if buf.lr != 0 {
+ throw("invalid use of gostartcall")
+ }
+ buf.lr = buf.pc
+ buf.pc = uintptr(fn)
+ buf.ctxt = ctxt
+}