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>
"mips64x": func() { genMIPS(true) },
"mipsx": func() { genMIPS(false) },
"ppc64x": genPPC64,
+ "riscv64": genRISCV64,
"s390x": genS390X,
"wasm": genWasm,
}
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.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64 !darwin,arm64 mips64 mips64le ppc64 ppc64le s390x
+// +build amd64 !darwin,arm64 mips64 mips64le ppc64 ppc64le riscv64 s390x
// See mpagealloc_32bit.go for why darwin/arm64 is excluded here.
--- /dev/null
+// Copyright 2019 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
+
+func osArchInit() {}
--- /dev/null
+// Code generated by mkpreempt.go; DO NOT EDIT.
+
+#include "go_asm.h"
+#include "textflag.h"
+
+TEXT ·asyncPreempt(SB),NOSPLIT|NOFRAME,$0-0
+ // No async preemption on riscv64 - see issue 36711
+ UNDEF