mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 07:07:33 -04:00
cpu: add linux/ppc64x
Port from Go internal/cpu. Fixes golang/go#25185 Change-Id: Id3cac18da6ffec9d10df755c4032ce3068ab634d Reviewed-on: https://go-review.googlesource.com/c/152938 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
cb59ee3660
commit
20be8e55dc
@@ -38,3 +38,17 @@ func TestARM64minimalFeatures(t *testing.T) {
|
||||
t.Fatal("HasFP expected true, got false")
|
||||
}
|
||||
}
|
||||
|
||||
// On ppc64x, the ISA bit for POWER8 should always be set on POWER8 and beyond.
|
||||
func TestPPC64minimalFeatures(t *testing.T) {
|
||||
// Do not run this with gccgo on ppc64, as it doesn't have POWER8 as a minimum
|
||||
// requirement.
|
||||
if runtime.Compiler == "gccgo" && runtime.GOARCH == "ppc64" {
|
||||
t.Skip("gccgo does not require POWER8 on ppc64; skipping")
|
||||
}
|
||||
if runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" {
|
||||
if !cpu.PPC64.IsPOWER8 {
|
||||
t.Fatal("IsPOWER8 expected true, got false")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user