2025-03-05 20:12:47 +00:00
|
|
|
// Copyright 2025 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.
|
|
|
|
|
|
2025-03-09 17:19:48 +00:00
|
|
|
//go:build amd64
|
|
|
|
|
|
2025-03-05 20:12:47 +00:00
|
|
|
package scan
|
|
|
|
|
|
2025-03-09 17:19:48 +00:00
|
|
|
import (
|
|
|
|
|
"internal/runtime/gc"
|
|
|
|
|
)
|
2025-03-05 20:12:47 +00:00
|
|
|
|
|
|
|
|
// ExpandAVX512 expands each bit in packed into f consecutive bits in unpacked,
|
|
|
|
|
// where f is the word size of objects in sizeClass.
|
|
|
|
|
//
|
|
|
|
|
// This is a testing entrypoint to the expanders used by scanSpanPacked*.
|
|
|
|
|
//
|
|
|
|
|
//go:noescape
|
2025-03-09 17:19:48 +00:00
|
|
|
func ExpandAVX512Asm(sizeClass int, packed *gc.ObjMask, unpacked *gc.PtrMask)
|
2025-03-05 20:12:47 +00:00
|
|
|
|
|
|
|
|
// gcExpandersAVX512 is the PCs of expander functions. These cannot be called directly
|
|
|
|
|
// as they don't follow the Go ABI, but you can use this to check if a given
|
|
|
|
|
// expander PC is 0.
|
|
|
|
|
//
|
|
|
|
|
// It is defined in assembly.
|
2025-03-09 17:19:48 +00:00
|
|
|
var gcExpandersAVX512Asm [len(gc.SizeClassToSize)]uintptr
|