-47bdc8bb36f16f9d1dec72df5dd6b45d7b0b0725
+6857530fb1662c05a3ce754df2bd9fa5acd3a35b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
--- /dev/null
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !386
+// +build !amd64
+// +build !amd64p32
+// +build !arm
+// +build !arm64
+// +build !mips
+// +build !mipsle
+// +build !mips64
+// +build !mips64le
+// +build !ppc64
+// +build !ppc64le
+// +build !riscv
+// +build !riscv64
+// +build !s390x
+// +build !wasm
+
+package cpu
+
+func initOptions() {}
--- /dev/null
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !aix
+// +build !linux
+// +build !zos
+
+// +build !386
+// +build !amd64
+// +build !amd64p32
+// +build !arm
+// +build !arm64
+// +build !mips64
+// +build !mips64le
+// +build !wasm
+
+package cpu
+
+func archInit() {}
// +build riscv
package cpu
+
+func initOptions() {}
--- /dev/null
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const GOARCH = "amd64p32"
--- /dev/null
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !386
+// +build !amd64
+// +build !amd64p32
+// +build !arm
+// +build !arm64
+// +build !mips64
+// +build !mips64le
+// +build !ppc
+// +build !ppc64
+// +build !ppc64le
+// +build !riscv64
+// +build !s390x
+
+package cpu
+
+func doinit() {
+}
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ppc64 ppc64le
+// +build ppc ppc64 ppc64le
package cpu
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ppc64 ppc64le
+// +build ppc ppc64 ppc64le
package cpu
+++ /dev/null
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc ppc64 ppc64le
-
-package cpu
-
-// ppc64x doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
-// These are initialized by archauxv and should not be changed after they are
-// initialized.
-// On aix/ppc64, these values are initialized early in the runtime in runtime/os_aix.go.
-var HWCap uint
-var HWCap2 uint
-
-// HWCAP/HWCAP2 bits. These are exposed by the kernel.
-const (
- // ISA Level
- PPC_FEATURE2_ARCH_2_07 = 0x80000000
- PPC_FEATURE2_ARCH_3_00 = 0x00800000
-
- // CPU features
- PPC_FEATURE2_DARN = 0x00200000
- PPC_FEATURE2_SCV = 0x00100000
-)
-
-func doinit() {
- options = []option{
- {Name: "darn", Feature: &PPC64.HasDARN},
- {Name: "scv", Feature: &PPC64.HasSCV},
- {Name: "power9", Feature: &PPC64.IsPOWER9},
- {Name: "power8", Feature: &PPC64.IsPOWER8},
- }
-
- // HWCAP2 feature bits
- PPC64.IsPOWER8 = isSet(HWCap2, PPC_FEATURE2_ARCH_2_07)
- PPC64.IsPOWER9 = isSet(HWCap2, PPC_FEATURE2_ARCH_3_00)
- PPC64.HasDARN = isSet(HWCap2, PPC_FEATURE2_DARN)
- PPC64.HasSCV = isSet(HWCap2, PPC_FEATURE2_SCV)
-}
-
-func isSet(hwc uint, value uint) bool {
- return hwc&value != 0
-}
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build 386 amd64
+// +build 386 amd64 amd64p32
package cpu
{Name: "ssse3", Feature: &X86.HasSSSE3},
// These capabilities should always be enabled on amd64:
- {Name: "sse2", Feature: &X86.HasSSE2, Required: GOARCH == "amd64"},
+ {Name: "sse2", Feature: &X86.HasSSE2, Required: GOARCH == "amd64" || GOARCH == "amd64p32"},
}
maxID, _, _, _ := cpuid(0, 0)