1
0
mirror of https://github.com/golang/go synced 2024-11-13 18:00:30 -07:00

debug/macho: Define CPU constants for other common architectures for OS X/iOS.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/69100045
This commit is contained in:
Robert Sesek 2014-02-27 19:11:03 -08:00 committed by Ian Lance Taylor
parent 67b8bf3e32
commit a9600502bb

View File

@ -44,14 +44,22 @@ const (
// A Cpu is a Mach-O cpu type.
type Cpu uint32
const cpuArch64 = 0x01000000
const (
Cpu386 Cpu = 7
CpuAmd64 Cpu = Cpu386 + 1<<24
CpuAmd64 Cpu = Cpu386 | cpuArch64
CpuArm Cpu = 12
CpuPpc Cpu = 18
CpuPpc64 Cpu = CpuPpc | cpuArch64
)
var cpuStrings = []intName{
{uint32(Cpu386), "Cpu386"},
{uint32(CpuAmd64), "CpuAmd64"},
{uint32(CpuArm), "CpuArm"},
{uint32(CpuPpc), "CpuPpc"},
{uint32(CpuPpc64), "CpuPpc64"},
}
func (i Cpu) String() string { return stringName(uint32(i), cpuStrings, false) }