Codebase list golang-github-minio-sha256-simd / 6de4475
fix build for all architectures (#47) * support all architectures automatically * fix arm64 linux support * ci: bump to 1.12.x 1.11 lists an invalid architecture * ci: fix go vet invocation * fix architecture test Co-Authored-By: Jakub Sztandera <kubuxu@protonmail.ch> Steven Allen authored 4 years ago Frank Wessels committed 4 years ago
18 changed file(s) with 33 addition(s) and 100 deletion(s). Raw diff Collapse all Expand all
66
77 go:
88 - tip
9 - 1.11.x
9 - 1.12.x
1010
1111 env:
1212 - ARCH=x86_64
2020 script:
2121 - diff -au <(gofmt -d .) <(printf "")
2222 - go test -race -v ./...
23 - go tool vet -asmdecl .
23 - go vet -asmdecl .
24 - ./test-architectures.sh
1212 // limitations under the License.
1313 //
1414
15 // +build ppc64 ppc64le mips mipsle mips64 mips64le s390x wasm
15 // +build !386,!amd64,!arm,!arm64 arm64,!linux
1616
1717 package sha256
1818
+0
-35
cpuid_others_arm64.go less more
0 // +build arm64,!linux
1
2 // Minio Cloud Storage, (C) 2016 Minio, Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 package sha256
18
19 func cpuid(op uint32) (eax, ebx, ecx, edx uint32) {
20 return 0, 0, 0, 0
21 }
22
23 func cpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) {
24 return 0, 0, 0, 0
25 }
26
27 func xgetbv(index uint32) (eax, edx uint32) {
28 return 0, 0
29 }
30
31 // Check for sha2 instruction flag.
32 func haveArmSha() bool {
33 return false
34 }
00 module github.com/minio/sha256-simd
1
2 go 1.12
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2016 Minio, Inc.
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2017 Minio, Inc.
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2017 Minio, Inc.
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2016 Minio, Inc.
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 package sha256
33
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 package sha256
33
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2016 Minio, Inc.
+0
-25
sha256block_386.go less more
0 //+build !noasm
1
2 /*
3 * Minio Cloud Storage, (C) 2016 Minio, Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package sha256
19
20 func blockArmGo(dig *digest, p []byte) {}
21 func blockAvx2Go(dig *digest, p []byte) {}
22 func blockAvxGo(dig *digest, p []byte) {}
23 func blockSsseGo(dig *digest, p []byte) {}
24 func blockShaGo(dig *digest, p []byte) {}
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2016 Minio, Inc.
+0
-25
sha256block_arm.go less more
0 //+build !noasm
1
2 /*
3 * Minio Cloud Storage, (C) 2016 Minio, Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package sha256
19
20 func blockAvx2Go(dig *digest, p []byte) {}
21 func blockAvxGo(dig *digest, p []byte) {}
22 func blockSsseGo(dig *digest, p []byte) {}
23 func blockShaGo(dig *digest, p []byte) {}
24 func blockArmGo(dig *digest, p []byte) {}
0 //+build !noasm
0 //+build !noasm,!appengine
11
22 /*
33 * Minio Cloud Storage, (C) 2016 Minio, Inc.
0 //+build !noasm !appengine
0 //+build !noasm,!appengine
11
22 // ARM64 version of SHA256
33
2727 TEXT ·blockArm(SB), 7, $0
2828 MOVD h+0(FP), R0
2929 MOVD message+24(FP), R1
30 MOVD lenmessage+32(FP), R2 // length of message
30 MOVD message_len+32(FP), R2 // length of message
3131 SUBS $64, R2
3232 BMI complete
3333
0 //+build noasm appengine ppc64 ppc64le mips mipsle mips64 mips64le s390x wasm
0 //+build appengine noasm !amd64,!arm64
11
22 /*
33 * Minio Cloud Storage, (C) 2019 Minio, Inc.
0 #!/bin/sh
1
2 set -e
3
4 go tool dist list | while IFS=/ read os arch; do
5 echo "Checking $os/$arch..."
6 echo " normal"
7 GOARCH=$arch GOOS=$os go build -o /dev/null ./...
8 echo " noasm"
9 GOARCH=$arch GOOS=$os go build -tags noasm -o /dev/null ./...
10 echo " appengine"
11 GOARCH=$arch GOOS=$os go build -tags appengine -o /dev/null ./...
12 echo " noasm,appengine"
13 GOARCH=$arch GOOS=$os go build -tags 'appengine noasm' -o /dev/null ./...
14 done