Build fix for go1.11rc1 (#6354)

Vendorized the following packages

- "github.com/rjeczalik/notify"
- "github.com/minio/highwayhash"

Fixes #6315
This commit is contained in:
Praveen raj Mani
2018-08-24 13:29:17 +05:30
committed by Nitish Tiwari
parent 52f6d5aafc
commit 01721a840a
15 changed files with 164 additions and 120 deletions
+16 -17
View File
@@ -7,18 +7,14 @@
package highwayhash
import "golang.org/x/sys/cpu"
var (
useSSE4 = supportsSSE4()
useAVX2 = supportsAVX2()
useSSE4 = cpu.X86.HasSSE41
useAVX2 = cpu.X86.HasAVX2
useNEON = false
)
//go:noescape
func supportsSSE4() bool
//go:noescape
func supportsAVX2() bool
//go:noescape
func initializeSSE4(state *[16]uint64, key []byte)
@@ -38,31 +34,34 @@ func finalizeSSE4(out []byte, state *[16]uint64)
func finalizeAVX2(out []byte, state *[16]uint64)
func initialize(state *[16]uint64, key []byte) {
if useAVX2 {
switch {
case useAVX2:
initializeAVX2(state, key)
} else if useSSE4 {
case useSSE4:
initializeSSE4(state, key)
} else {
default:
initializeGeneric(state, key)
}
}
func update(state *[16]uint64, msg []byte) {
if useAVX2 {
switch {
case useAVX2:
updateAVX2(state, msg)
} else if useSSE4 {
case useSSE4:
updateSSE4(state, msg)
} else {
default:
updateGeneric(state, msg)
}
}
func finalize(out []byte, state *[16]uint64) {
if useAVX2 {
switch {
case useAVX2:
finalizeAVX2(out, state)
} else if useSSE4 {
case useSSE4:
finalizeSSE4(out, state)
} else {
default:
finalizeGeneric(out, state)
}
}
-5
View File
@@ -248,8 +248,3 @@ hash64:
MOVQ DX, 0(BX)
RET
// func supportsAVX2() bool
TEXT ·supportsAVX2(SB), 4, $0-1
MOVQ runtime·support_avx2(SB), AX
MOVB AX, ret+0(FP)
RET
+3 -4
View File
@@ -7,15 +7,14 @@
package highwayhash
import "golang.org/x/sys/cpu"
var (
useSSE4 = supportsSSE4()
useSSE4 = cpu.X86.HasSSE41
useAVX2 = false
useNEON = false
)
//go:noescape
func supportsSSE4() bool
//go:noescape
func initializeSSE4(state *[16]uint64, key []byte)
-9
View File
@@ -292,12 +292,3 @@ hash64:
MOVQ m10, DX
MOVQ DX, 0(BX)
RET
// func supportsSSE4() bool
TEXT ·supportsSSE4(SB), 4, $0-1
MOVL $1, AX
CPUID
SHRL $19, CX // Bit 19 indicates SSE4 support
ANDL $1, CX // CX != 0 if support SSE4
MOVB CX, ret+0(FP)
RET