aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_freebsd.go
diff options
context:
space:
mode:
authorYuval Pavel Zholkover <paulzhol@gmail.com>2018-03-23 17:53:26 +0300
committerIan Lance Taylor <iant@golang.org>2018-03-23 19:51:25 +0000
commit6f47fa2d6c6b2d4fdfc5b3a98fa8e3cd8469ca16 (patch)
tree8c1dea1161286821c570dc77d7156b35ea4ddfe6 /src/runtime/os_freebsd.go
parent41402b59bd7401bf0b4ff3043dfe3d3fa712e05c (diff)
downloadgo-6f47fa2d6c6b2d4fdfc5b3a98fa8e3cd8469ca16.tar.gz
go-6f47fa2d6c6b2d4fdfc5b3a98fa8e3cd8469ca16.zip
runtime: fix AT_HWCAP auxv parsing on freebsd
AT_HWCAP is not available on FreeBSD-11.1-RELEASE or earlier and the wrong const was used. Use the correct value, and initialize hwcap with ^uint32(0) inorder not to fail the VFP tests. Fixes #24507. Change-Id: I5c3eed57bb53bf992b7de0eec88ea959806306b9 Reviewed-on: https://go-review.googlesource.com/102355 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/os_freebsd.go')
-rw-r--r--src/runtime/os_freebsd.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/os_freebsd.go b/src/runtime/os_freebsd.go
index b09dc04433..fafe7f470b 100644
--- a/src/runtime/os_freebsd.go
+++ b/src/runtime/os_freebsd.go
@@ -380,7 +380,7 @@ func sysargs(argc int32, argv **byte) {
const (
_AT_NULL = 0 // Terminates the vector
_AT_PAGESZ = 6 // Page size in bytes
- _AT_HWCAP = 16 // CPU feature flags
+ _AT_HWCAP = 26 // CPU feature flags
)
func sysauxv(auxv []uintptr) {