aboutsummaryrefslogtreecommitdiff
path: root/src/vendor
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2026-03-20 13:55:38 -0400
committerGopher Robot <gobot@golang.org>2026-03-20 13:53:43 -0700
commitf2dae4c19d20070eeb2cef6baa5c20e0081f53f9 (patch)
treee565327c235d95431bbd190e66aa20f533b1e25a /src/vendor
parentc8df1410d50f69b50eb5e643d15b6a3aab0ada06 (diff)
downloadgo-f2dae4c19d20070eeb2cef6baa5c20e0081f53f9.tar.xz
all: update to x/tools@5d7afbc08aec
Pull in CL 757060 to get x/tools/cmd/bundle working again. For #36905. For #9859. [git-generate] cd src/cmd go get golang.org/x/tools@v0.43.1-0.20260319213245-5d7afbc08aec # CL 757060 go get golang.org/x/sys@v0.42.1-0.20260320201212-a76ec62d6c53 # for #78259 go mod tidy go mod vendor cd .. go get golang.org/x/sys@v0.42.1-0.20260320201212-a76ec62d6c53 # for consistency with the version in cmd go mod tidy go mod vendor Change-Id: I27ec579e91923c8ea89c7f3a120f2220676a68c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/757520 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/vendor')
-rw-r--r--src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s12
-rw-r--r--src/vendor/golang.org/x/sys/cpu/cpu_arm64.go9
-rw-r--r--src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go67
-rw-r--r--src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go29
-rw-r--r--src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go1
-rw-r--r--src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go6
-rw-r--r--src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go54
-rw-r--r--src/vendor/modules.txt4
8 files changed, 172 insertions, 10 deletions
diff --git a/src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s b/src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s
new file mode 100644
index 0000000000..e07fa75eb5
--- /dev/null
+++ b/src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s
@@ -0,0 +1,12 @@
+// Copyright 2024 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.
+
+//go:build darwin && arm64 && gc
+
+#include "textflag.h"
+
+TEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctlbyname(SB)
+GLOBL ·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB)
diff --git a/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go
index af2aa99f9f..5fc09e2935 100644
--- a/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go
+++ b/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go
@@ -44,14 +44,11 @@ func initOptions() {
}
func archInit() {
- switch runtime.GOOS {
- case "freebsd":
+ if runtime.GOOS == "freebsd" {
readARM64Registers()
- case "linux", "netbsd", "openbsd":
+ } else {
+ // Most platforms don't seem to allow directly reading these registers.
doinit()
- default:
- // Many platforms don't seem to allow reading these registers.
- setMinimalFeatures()
}
}
diff --git a/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go b/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go
new file mode 100644
index 0000000000..0b470744a0
--- /dev/null
+++ b/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go
@@ -0,0 +1,67 @@
+// Copyright 2026 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.
+
+//go:build darwin && arm64 && gc
+
+package cpu
+
+func doinit() {
+ setMinimalFeatures()
+
+ // The feature flags are explained in [Instruction Set Detection].
+ // There are some differences between MacOS versions:
+ //
+ // MacOS 11 and 12 do not have "hw.optional" sysctl values for some of the features.
+ //
+ // MacOS 13 changed some of the naming conventions to align with ARM Architecture Reference Manual.
+ // For example "hw.optional.armv8_2_sha512" became "hw.optional.arm.FEAT_SHA512".
+ // It currently checks both to stay compatible with MacOS 11 and 12.
+ // The old names also work with MacOS 13, however it's not clear whether
+ // they will continue working with future OS releases.
+ //
+ // Once MacOS 12 is no longer supported the old names can be removed.
+ //
+ // [Instruction Set Detection]: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics
+
+ // Encryption, hashing and checksum capabilities
+
+ // For the following flags there are no MacOS 11 sysctl flags.
+ ARM64.HasAES = true || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_AES\x00"))
+ ARM64.HasPMULL = true || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_PMULL\x00"))
+ ARM64.HasSHA1 = true || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SHA1\x00"))
+ ARM64.HasSHA2 = true || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SHA256\x00"))
+
+ ARM64.HasSHA3 = darwinSysctlEnabled([]byte("hw.optional.armv8_2_sha3\x00")) || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SHA3\x00"))
+ ARM64.HasSHA512 = darwinSysctlEnabled([]byte("hw.optional.armv8_2_sha512\x00")) || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SHA512\x00"))
+
+ ARM64.HasCRC32 = darwinSysctlEnabled([]byte("hw.optional.armv8_crc32\x00"))
+
+ // Atomic and memory ordering
+ ARM64.HasATOMICS = darwinSysctlEnabled([]byte("hw.optional.armv8_1_atomics\x00")) || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_LSE\x00"))
+ ARM64.HasLRCPC = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_LRCPC\x00"))
+
+ // SIMD and floating point capabilities
+ ARM64.HasFPHP = darwinSysctlEnabled([]byte("hw.optional.neon_fp16\x00")) || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_FP16\x00"))
+ ARM64.HasASIMDHP = darwinSysctlEnabled([]byte("hw.optional.neon_hpfp\x00")) || darwinSysctlEnabled([]byte("hw.optional.AdvSIMD_HPFPCvt\x00"))
+ ARM64.HasASIMDRDM = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_RDM\x00"))
+ ARM64.HasASIMDDP = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_DotProd\x00"))
+ ARM64.HasASIMDFHM = darwinSysctlEnabled([]byte("hw.optional.armv8_2_fhm\x00")) || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_FHM\x00"))
+ ARM64.HasI8MM = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_I8MM\x00"))
+
+ ARM64.HasJSCVT = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_JSCVT\x00"))
+ ARM64.HasFCMA = darwinSysctlEnabled([]byte("hw.optional.armv8_3_compnum\x00")) || darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_FCMA\x00"))
+
+ // Miscellaneous
+ ARM64.HasDCPOP = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_DPB\x00"))
+ ARM64.HasEVTSTRM = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_ECV\x00"))
+ ARM64.HasDIT = darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_DIT\x00"))
+
+ // Not supported, but added for completeness
+ ARM64.HasCPUID = false
+
+ ARM64.HasSM3 = false // darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SM3\x00"))
+ ARM64.HasSM4 = false // darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SM4\x00"))
+ ARM64.HasSVE = false // darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SVE\x00"))
+ ARM64.HasSVE2 = false // darwinSysctlEnabled([]byte("hw.optional.arm.FEAT_SVE2\x00"))
+}
diff --git a/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go b/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go
new file mode 100644
index 0000000000..4ee68e38d9
--- /dev/null
+++ b/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go
@@ -0,0 +1,29 @@
+// Copyright 2026 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.
+
+//go:build darwin && arm64 && !gc
+
+package cpu
+
+func doinit() {
+ setMinimalFeatures()
+
+ ARM64.HasASIMD = true
+ ARM64.HasFP = true
+
+ // Go already assumes these to be available because they were on the M1
+ // and these are supported on all Apple arm64 chips.
+ ARM64.HasAES = true
+ ARM64.HasPMULL = true
+ ARM64.HasSHA1 = true
+ ARM64.HasSHA2 = true
+
+ if runtime.GOOS != "ios" {
+ // Apple A7 processors do not support these, however
+ // M-series SoCs are at least armv8.4-a
+ ARM64.HasCRC32 = true // armv8.1
+ ARM64.HasATOMICS = true // armv8.2
+ ARM64.HasJSCVT = true // armv8.3, if HasFP
+ }
+}
diff --git a/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
index 7f1946780b..05913081ec 100644
--- a/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
+++ b/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
@@ -9,3 +9,4 @@ package cpu
func getisar0() uint64 { return 0 }
func getisar1() uint64 { return 0 }
func getpfr0() uint64 { return 0 }
+func getzfr0() uint64 { return 0 }
diff --git a/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
index 5341e7f88d..53f814d7a6 100644
--- a/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
+++ b/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !linux && !netbsd && !openbsd && arm64
+//go:build !darwin && !linux && !netbsd && !openbsd && arm64
package cpu
-func doinit() {}
+func doinit() {
+ setMinimalFeatures()
+}
diff --git a/src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go b/src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go
new file mode 100644
index 0000000000..7b4e67ff9c
--- /dev/null
+++ b/src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go
@@ -0,0 +1,54 @@
+// Copyright 2024 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.
+
+// Minimal copy from internal/cpu and runtime to make sysctl calls.
+
+//go:build darwin && arm64 && gc
+
+package cpu
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+type Errno = syscall.Errno
+
+// adapted from internal/cpu/cpu_arm64_darwin.go
+func darwinSysctlEnabled(name []byte) bool {
+ out := int32(0)
+ nout := unsafe.Sizeof(out)
+ if ret := sysctlbyname(&name[0], (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); ret != nil {
+ return false
+ }
+ return out > 0
+}
+
+//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
+
+var libc_sysctlbyname_trampoline_addr uintptr
+
+// adapted from runtime/sys_darwin.go in the pattern of sysctl() above, as defined in x/sys/unix
+func sysctlbyname(name *byte, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
+ if _, _, err := syscall_syscall6(
+ libc_sysctlbyname_trampoline_addr,
+ uintptr(unsafe.Pointer(name)),
+ uintptr(unsafe.Pointer(old)),
+ uintptr(unsafe.Pointer(oldlen)),
+ uintptr(unsafe.Pointer(new)),
+ uintptr(newlen),
+ 0,
+ ); err != 0 {
+ return err
+ }
+
+ return nil
+}
+
+//go:cgo_import_dynamic libc_sysctlbyname sysctlbyname "/usr/lib/libSystem.B.dylib"
+
+// Implemented in the runtime package (runtime/sys_darwin.go)
+func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+
+//go:linkname syscall_syscall6 syscall.syscall6
diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt
index 48967bc9ee..e8c6f1efb0 100644
--- a/src/vendor/modules.txt
+++ b/src/vendor/modules.txt
@@ -15,8 +15,8 @@ golang.org/x/net/http2/hpack
golang.org/x/net/idna
golang.org/x/net/lif
golang.org/x/net/nettest
-# golang.org/x/sys v0.40.1-0.20260116220947-d25a7aaff8c2
-## explicit; go 1.24.0
+# golang.org/x/sys v0.42.1-0.20260320201212-a76ec62d6c53
+## explicit; go 1.25.0
golang.org/x/sys/cpu
# golang.org/x/text v0.33.1-0.20260122225119-3264de9174be
## explicit; go 1.24.0