]> Cypherpunks.ru repositories - gostls13.git/commit
internal/cpu: new package to detect cpu features
authorMartin Möhrmann <moehrmann@google.com>
Mon, 3 Apr 2017 20:38:09 +0000 (22:38 +0200)
committerKeith Randall <khr@golang.org>
Wed, 10 May 2017 17:02:21 +0000 (17:02 +0000)
commit69972aea74de6a0397a05281475d1ca006da7bb0
treef2147a8505d70bd63a2f51ffe57a33a4df2a1444
parent4fc498d89a1e7cef854ed95c00ce7fed817e75a4
internal/cpu: new package to detect cpu features

Implements detection of x86 cpu features that
are used in the go standard library.

Changes all standard library packages to use the new cpu package
instead of using runtime internal variables to check x86 cpu features.

Updates: #15403

Change-Id: I2999a10cb4d9ec4863ffbed72f4e021a1dbc4bb9
Reviewed-on: https://go-review.googlesource.com/41476
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
31 files changed:
src/bytes/bytes_amd64.go
src/cmd/dist/deps.go
src/cmd/vet/all/whitelist/amd64.txt
src/crypto/sha1/sha1block_amd64.go
src/crypto/sha1/sha1block_amd64.s
src/crypto/sha256/sha256block_amd64.go [new file with mode: 0644]
src/crypto/sha256/sha256block_amd64.s
src/crypto/sha512/sha512block_amd64.go
src/crypto/sha512/sha512block_amd64.s
src/go/build/deps_test.go
src/hash/crc32/crc32_amd64.go
src/hash/crc32/crc32_amd64.s
src/hash/crc32/crc32_amd64p32.go
src/hash/crc32/crc32_amd64p32.s
src/internal/cpu/cpu.go [new file with mode: 0644]
src/internal/cpu/cpu_arm.go [new file with mode: 0644]
src/internal/cpu/cpu_arm64.go [new file with mode: 0644]
src/internal/cpu/cpu_mips.go [new file with mode: 0644]
src/internal/cpu/cpu_mips64.go [new file with mode: 0644]
src/internal/cpu/cpu_mips64le.go [new file with mode: 0644]
src/internal/cpu/cpu_mipsle.go [new file with mode: 0644]
src/internal/cpu/cpu_ppc64.go [new file with mode: 0644]
src/internal/cpu/cpu_ppc64le.go [new file with mode: 0644]
src/internal/cpu/cpu_s390x.go [new file with mode: 0644]
src/internal/cpu/cpu_test.go [new file with mode: 0644]
src/internal/cpu/cpu_x86.go [new file with mode: 0644]
src/internal/cpu/cpu_x86.s [new file with mode: 0644]
src/math/floor_amd64.s
src/math/floor_asm.go
src/runtime/asm_amd64.s
src/strings/strings_amd64.go