1
0
mirror of https://github.com/golang/go synced 2024-11-26 03:57:57 -07:00

cmd/internal/sys: declare loong64 arch

Updates #46229

Change-Id: Icb736f2440443e9245872b091d13e5bdfb6cb01a
Reviewed-on: https://go-review.googlesource.com/c/go/+/339009
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Meng Zhuo <mzh@golangcn.org>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
WANG Xuerui 2021-06-20 12:59:45 +08:00 committed by Meng Zhuo
parent 7b69ddc171
commit c7f09eeb13

View File

@ -22,6 +22,7 @@ const (
RISCV64
S390X
Wasm
Loong64
)
// Arch represents an individual architecture.
@ -189,6 +190,16 @@ var ArchWasm = &Arch{
Alignment: 1,
}
var ArchLoong64 = &Arch{
Name: "loong64",
Family: Loong64,
ByteOrder: binary.LittleEndian,
PtrSize: 8,
RegSize: 8,
MinLC: 4,
Alignment: 8, // Unaligned accesses are not guaranteed to be fast
}
var Archs = [...]*Arch{
Arch386,
ArchAMD64,
@ -203,4 +214,5 @@ var Archs = [...]*Arch{
ArchRISCV64,
ArchS390X,
ArchWasm,
ArchLoong64,
}