Source file src/internal/runtime/gc/scan/filter_riscv64.go

     1  // Copyright 2026 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.
     4  
     5  package scan
     6  
     7  import "internal/cpu"
     8  
     9  // FilterNilRVV packs the non-nil values of bufp[0:n] at the front of bufp,
    10  // returning the packed length. It uses the RVV implementation when the V
    11  // extension is available and falls back to the generic FilterNil otherwise.
    12  func FilterNilRVV(bufp *uintptr, n int32) int32 {
    13  	if cpu.RISCV64.HasV {
    14  		return filterNilRVV(bufp, n)
    15  	}
    16  	return FilterNil(bufp, n)
    17  }
    18  
    19  //go:noescape
    20  func filterNilRVV(bufp *uintptr, n int32) int32
    21  

View as plain text