aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mkpreempt.go
diff options
context:
space:
mode:
authorJoel Sing <joel@sing.id.au>2020-01-23 03:42:07 +1100
committerJoel Sing <joel@sing.id.au>2020-01-23 14:36:57 +0000
commit82a2f825b7163eafebbf9b8640ef6406e4dda9a9 (patch)
treee1678c325465dff3bac1dba15ded5a91e6724e08 /src/runtime/mkpreempt.go
parent9f07cdd99ee70b90e2a5fe998acb48c5fc6e39f2 (diff)
downloadgo-82a2f825b7163eafebbf9b8640ef6406e4dda9a9.tar.gz
go-82a2f825b7163eafebbf9b8640ef6406e4dda9a9.zip
runtime: add missing code for linux/riscv64
Makes linux/riscv64 runtime buildable. Updates #27532 Change-Id: I91bcadaaecb8ff3ffd70fcb437b2b6e4bbe11eda Reviewed-on: https://go-review.googlesource.com/c/go/+/215839 Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/mkpreempt.go')
-rw-r--r--src/runtime/mkpreempt.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/mkpreempt.go b/src/runtime/mkpreempt.go
index 615ec1868c..64e220772e 100644
--- a/src/runtime/mkpreempt.go
+++ b/src/runtime/mkpreempt.go
@@ -83,6 +83,7 @@ var arches = map[string]func(){
"mips64x": func() { genMIPS(true) },
"mipsx": func() { genMIPS(false) },
"ppc64x": genPPC64,
+ "riscv64": genRISCV64,
"s390x": genS390X,
"wasm": genWasm,
}
@@ -478,6 +479,11 @@ func genPPC64() {
p("JMP (CTR)")
}
+func genRISCV64() {
+ p("// No async preemption on riscv64 - see issue 36711")
+ p("UNDEF")
+}
+
func genS390X() {
// Add integer registers R0-R12
// R13 (g), R14 (LR), R15 (SP) are special, and not saved here.