1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 // This file contains the code to call the SSE 4.2 version of the Castagnoli
12 // castagnoliSSE42 is defined in crc32_amd64p32.s and uses the SSE4.2 CRC32
15 func castagnoliSSE42(crc
uint32, p
[]byte) uint32
17 func archAvailableCastagnoli() bool {
18 return cpu
.X86
.HasSSE42
21 func archInitCastagnoli() {
22 if !cpu
.X86
.HasSSE42
{
23 panic("not available")
25 // No initialization necessary.
28 func archUpdateCastagnoli(crc
uint32, p
[]byte) uint32 {
29 if !cpu
.X86
.HasSSE42
{
30 panic("not available")
32 return castagnoliSSE42(crc
, p
)
35 func archAvailableIEEE() bool { return false }
36 func archInitIEEE() { panic("not available") }
37 func archUpdateIEEE(crc
uint32, p
[]byte) uint32 { panic("not available") }