Source file src/internal/runtime/gc/scan/filter_riscv64_test.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  //go:build riscv64
     6  
     7  package scan_test
     8  
     9  import (
    10  	"internal/cpu"
    11  	"internal/runtime/gc/scan"
    12  	"testing"
    13  )
    14  
    15  func TestFilterNilRVV(t *testing.T) {
    16  	if !cpu.RISCV64.HasV {
    17  		t.Skip("V extension is required for TestFilterNilRVV")
    18  	}
    19  	runTestFilterNil(t, scan.FilterNilRVV)
    20  }
    21  
    22  func filterNilPlatform() func(*uintptr, int32) int32 {
    23  	if cpu.RISCV64.HasV {
    24  		return scan.FilterNilRVV
    25  	}
    26  	return nil
    27  }
    28  

View as plain text