]> Cypherpunks repositories - gostls13.git/commit
internal/bytealg: move IndexByte asssembly to the new bytealg package
authorKeith Randall <khr@google.com>
Fri, 2 Mar 2018 00:38:41 +0000 (16:38 -0800)
committerKeith Randall <khr@golang.org>
Fri, 2 Mar 2018 22:46:15 +0000 (22:46 +0000)
commit403ab0f2214f583db84a2dae275389be92072a35
tree9ff2fc82235a27acd95595f2152f03eec83fa71e
parentdcedcaa5fb15748cc2e5cb9461fc6b4f4fc942cb
internal/bytealg: move IndexByte asssembly to the new bytealg package

Move the IndexByte function from the runtime to a new bytealg package.
The new package will eventually hold all the optimized assembly for
groveling through byte slices and strings. It seems a better home for
this code than randomly keeping it in runtime.

Once this is in, the next step is to move the other functions
(Compare, Equal, ...).

Update #19792

This change seems complicated enough that we might just declare
"not worth it" and abandon.  Opinions welcome.

The core assembly is all unchanged, except minor modifications where
the code reads cpu feature bits.

The wrapper functions have been cleaned up as they are now actually
checked by vet.

Change-Id: I9fa75bee5d85db3a65b3fd3b7997e60367523796
Reviewed-on: https://go-review.googlesource.com/98016
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
32 files changed:
src/bytes/bytes_decl.go
src/cmd/dist/build.go
src/cmd/link/internal/ld/data.go
src/cmd/vet/all/whitelist/all.txt
src/cmd/vet/all/whitelist/amd64.txt
src/cmd/vet/all/whitelist/nacl_amd64p32.txt
src/cmd/vet/all/whitelist/s390x.txt
src/go/build/deps_test.go
src/internal/bytealg/indexbyte_386.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_amd64.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_amd64p32.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_arm.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_arm64.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_generic.go [new file with mode: 0644]
src/internal/bytealg/indexbyte_mips64x.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_mipsx.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_native.go [new file with mode: 0644]
src/internal/bytealg/indexbyte_ppc64x.s [new file with mode: 0644]
src/internal/bytealg/indexbyte_s390x.s [new file with mode: 0644]
src/internal/cpu/cpu.go
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_mips64x.s
src/runtime/asm_mipsx.s
src/runtime/asm_ppc64x.s
src/runtime/asm_s390x.s
src/runtime/error.go
src/runtime/os_linux_s390x.go
src/strings/strings_decl.go