aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXiaodong Liu <liuxiaodong@loongson.cn>2021-11-15 20:53:47 +0800
committerIan Lance Taylor <iant@golang.org>2022-05-17 19:48:21 +0000
commit30b17b6f604e30327df7ea800711526201d19aff (patch)
tree8a5c3ee4820abaadbf086771b194c2ea2643954d /src
parentd23c80b8e4cf1ff69176c78794a2cae10a1f5501 (diff)
downloadgo-30b17b6f604e30327df7ea800711526201d19aff.tar.xz
internal/{cpu, goarch}: add constant definition for loong64
Contributors to the loong64 port are: Weining Lu <luweining@loongson.cn> Lei Wang <wanglei@loongson.cn> Lingqin Gong <gonglingqin@loongson.cn> Xiaolin Zhao <zhaoxiaolin@loongson.cn> Meidan Li <limeidan@loongson.cn> Xiaojuan Zhai <zhaixiaojuan@loongson.cn> Qiyuan Pu <puqiyuan@loongson.cn> Guoqi Chen <chenguoqi@loongson.cn> This port has been updated to Go 1.15.6: https://github.com/loongson/go Updates #46229 Change-Id: I39d42e5959391e47bf621b3bdd3d95de72f023cc Reviewed-on: https://go-review.googlesource.com/c/go/+/342318 Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/internal/cpu/cpu_loong64.go11
-rw-r--r--src/internal/goarch/goarch.go1
-rw-r--r--src/internal/goarch/goarch_loong64.go15
3 files changed, 27 insertions, 0 deletions
diff --git a/src/internal/cpu/cpu_loong64.go b/src/internal/cpu/cpu_loong64.go
new file mode 100644
index 0000000000..d8403d731a
--- /dev/null
+++ b/src/internal/cpu/cpu_loong64.go
@@ -0,0 +1,11 @@
+// Copyright 2022 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 loong64
+
+package cpu
+
+const CacheLinePadSize = 32
+
+func doinit() {}
diff --git a/src/internal/goarch/goarch.go b/src/internal/goarch/goarch.go
index e8de67b01b..3dda62fadc 100644
--- a/src/internal/goarch/goarch.go
+++ b/src/internal/goarch/goarch.go
@@ -19,6 +19,7 @@ const (
ARM
ARM64
I386
+ LOONG64
MIPS
MIPS64
PPC64
diff --git a/src/internal/goarch/goarch_loong64.go b/src/internal/goarch/goarch_loong64.go
new file mode 100644
index 0000000000..dae1f4da31
--- /dev/null
+++ b/src/internal/goarch/goarch_loong64.go
@@ -0,0 +1,15 @@
+// Copyright 2022 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 loong64
+
+package goarch
+
+const (
+ _ArchFamily = LOONG64
+ _DefaultPhysPageSize = 16384
+ _PCQuantum = 4
+ _MinFrameSize = 8
+ _StackAlign = PtrSize
+)