diff options
| author | 2025-11-05 21:58:38 +0100 | |
|---|---|---|
| committer | 2025-11-17 14:12:41 +0100 | |
| commit | d0c551acb5ab79efafd325f5b19c76a3de835356 (patch) | |
| tree | ba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/klauspost/crc32/crc32_loong64.go | |
| parent | [performance] when transforming media, perform read operations of large files... (diff) | |
| download | gotosocial-d0c551acb5ab79efafd325f5b19c76a3de835356.tar.xz | |
[chore] update dependencies (#4542)
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97
- github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0
- github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6
- codeberg.org/gruf/go-mmap: fixes build for BSD platforms
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/klauspost/crc32/crc32_loong64.go')
| -rw-r--r-- | vendor/github.com/klauspost/crc32/crc32_loong64.go | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/crc32/crc32_loong64.go b/vendor/github.com/klauspost/crc32/crc32_loong64.go new file mode 100644 index 000000000..3e0fd9778 --- /dev/null +++ b/vendor/github.com/klauspost/crc32/crc32_loong64.go @@ -0,0 +1,50 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// LoongArch64-specific hardware-assisted CRC32 algorithms. See crc32.go for a +// description of the interface that each architecture-specific file +// implements. + +package crc32 + +import "golang.org/x/sys/cpu" + +func castagnoliUpdate(crc uint32, p []byte) uint32 +func ieeeUpdate(crc uint32, p []byte) uint32 + +func archAvailableCastagnoli() bool { + return cpu.Loong64.HasCRC32 +} + +func archInitCastagnoli() { + if !cpu.Loong64.HasCRC32 { + panic("arch-specific crc32 instruction for Castagnoli not available") + } +} + +func archUpdateCastagnoli(crc uint32, p []byte) uint32 { + if !cpu.Loong64.HasCRC32 { + panic("arch-specific crc32 instruction for Castagnoli not available") + } + + return ^castagnoliUpdate(^crc, p) +} + +func archAvailableIEEE() bool { + return cpu.Loong64.HasCRC32 +} + +func archInitIEEE() { + if !cpu.Loong64.HasCRC32 { + panic("arch-specific crc32 instruction for IEEE not available") + } +} + +func archUpdateIEEE(crc uint32, p []byte) uint32 { + if !cpu.Loong64.HasCRC32 { + panic("arch-specific crc32 instruction for IEEE not available") + } + + return ^ieeeUpdate(^crc, p) +} |
