mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
cpu: add support for detecting cpu features on loong64
Except for lasx, all other features have been implemented in the Go mainline. Change-Id: I61a09396ed23d17991b641a1265e952585cb5636 Reviewed-on: https://go-review.googlesource.com/c/sys/+/655355 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Meidan Li <limeidan@loongson.cn>
This commit is contained in:
@@ -87,6 +87,14 @@ func TestARM64minimalFeatures(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLOONG64Initialized(t *testing.T) {
|
||||
if runtime.GOARCH == "loong64" {
|
||||
if !cpu.Initialized {
|
||||
t.Fatal("Initialized expected true, got false")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestMIPS64Initialized(t *testing.T) {
|
||||
if runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
|
||||
if !cpu.Initialized {
|
||||
|
||||
Reference in New Issue
Block a user