Source file src/internal/cpu/cpu_riscv64.go

     1  // Copyright 2019 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 cpu
     6  
     7  const CacheLinePadSize = 64
     8  
     9  // RISC-V doesn't have a 'cpuid' equivalent. On Linux we rely on the riscv_hwprobe syscall.
    10  
    11  func doinit() {
    12  	options = []option{
    13  		{Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned},
    14  		{Name: "v", Feature: &RISCV64.HasV},
    15  	}
    16  	osInit()
    17  }
    18  
    19  func isSet(hwc uint, value uint) bool {
    20  	return hwc&value != 0
    21  }
    22  

View as plain text