mirror of
https://github.com/golang/sys.git
synced 2026-02-08 19:56:04 +03:00
cpu: add all GOARCHes supported by gccgo
Extend hostByteOrder to return the correct byte order for all GOARCHes currently supported by gccgo. Change-Id: I019de33aa598c58fe75cd7ad55479e6fce82dd8e Reviewed-on: https://go-review.googlesource.com/c/sys/+/237897 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
226ff32320
commit
2780627062
@@ -44,15 +44,20 @@ func (bigEndian) Uint64(b []byte) uint64 {
|
||||
func hostByteOrder() byteOrder {
|
||||
switch runtime.GOARCH {
|
||||
case "386", "amd64", "amd64p32",
|
||||
"alpha",
|
||||
"arm", "arm64",
|
||||
"mipsle", "mips64le", "mips64p32le",
|
||||
"nios2",
|
||||
"ppc64le",
|
||||
"riscv", "riscv64":
|
||||
"riscv", "riscv64",
|
||||
"sh":
|
||||
return littleEndian{}
|
||||
case "armbe", "arm64be",
|
||||
"m68k",
|
||||
"mips", "mips64", "mips64p32",
|
||||
"ppc", "ppc64",
|
||||
"s390", "s390x",
|
||||
"shbe",
|
||||
"sparc", "sparc64":
|
||||
return bigEndian{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user