summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/cpu/cpu.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-09-09 08:24:38 +0000
committerLibravatar GitHub <noreply@github.com>2024-09-09 08:24:38 +0000
commit7785fa54da27a15e5463ba5eae90f3f8561ef06a (patch)
tree47503b3190de0feaf1609f0d27b762a9f6954c75 /vendor/golang.org/x/sys/cpu/cpu.go
parent[chore]: Bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 (#3284) (diff)
downloadgotosocial-7785fa54da27a15e5463ba5eae90f3f8561ef06a.tar.xz
[chore]: Bump golang.org/x/crypto from 0.26.0 to 0.27.0 (#3283)
Diffstat (limited to 'vendor/golang.org/x/sys/cpu/cpu.go')
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index ec07aab05..02609d5b2 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -201,6 +201,25 @@ var S390X struct {
_ CacheLinePad
}
+// RISCV64 contains the supported CPU features and performance characteristics for riscv64
+// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate
+// the presence of RISC-V extensions.
+//
+// It is safe to assume that all the RV64G extensions are supported and so they are omitted from
+// this structure. As riscv64 Go programs require at least RV64G, the code that populates
+// this structure cannot run successfully if some of the RV64G extensions are missing.
+// The struct is padded to avoid false sharing.
+var RISCV64 struct {
+ _ CacheLinePad
+ HasFastMisaligned bool // Fast misaligned accesses
+ HasC bool // Compressed instruction-set extension
+ HasV bool // Vector extension compatible with RVV 1.0
+ HasZba bool // Address generation instructions extension
+ HasZbb bool // Basic bit-manipulation extension
+ HasZbs bool // Single-bit instructions extension
+ _ CacheLinePad
+}
+
func init() {
archInit()
initOptions()