cpu: add linux/arm64

Port from Go internal/cpu

Updates golang/go#25185

Change-Id: I8390980e38b61f6c428fafa0665a03952e7b00bb
Reviewed-on: https://go-review.googlesource.com/c/150718
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Meng Zhuo
2018-12-06 07:42:57 +00:00
committed by Tobias Klauser
parent a5c9d58dba
commit 70b957f3b6
9 changed files with 169 additions and 0 deletions
+12
View File
@@ -26,3 +26,15 @@ func TestAVX2hasAVX(t *testing.T) {
}
}
}
func TestARM64minimalFeatures(t *testing.T) {
if runtime.GOARCH != "arm64" || runtime.GOOS != "linux" {
return
}
if !cpu.ARM64.HasASIMD {
t.Fatal("HasASIMD expected true, got false")
}
if !cpu.ARM64.HasFP {
t.Fatal("HasFP expected true, got false")
}
}