mirror of
https://gitea.com/Sirherobrine23/tea.git
synced 2024-08-21 10:57:25 +00:00
* update & migrate gitea sdk (Fix Delete Tag Issue) * upgraded github.com/AlecAivazis/survey v2.2.7 => v2.2.8 * upgraded github.com/adrg/xdg v0.2.3 => v0.3.1 * upgraded github.com/araddon/dateparse * upgraded github.com/olekukonko/tablewriter v0.0.4 => v0.0.5 * upgraded gopkg.in/yaml.v2 v2.3.0 => v2.4.0 Reviewed-on: https://gitea.com/gitea/tea/pulls/337 Reviewed-by: Norwin <noerw@noreply.gitea.io> Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
33 lines
815 B
Go
33 lines
815 B
Go
// Copyright 2018 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.
|
|
|
|
//go:build linux && (ppc64 || ppc64le)
|
|
// +build linux
|
|
// +build ppc64 ppc64le
|
|
|
|
package cpu
|
|
|
|
// 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() {
|
|
// 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
|
|
}
|