]> Cypherpunks repositories - gostls13.git/commitdiff
internal/{cpu, goarch}: add constant definition for loong64
authorXiaodong Liu <liuxiaodong@loongson.cn>
Mon, 15 Nov 2021 12:53:47 +0000 (20:53 +0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 17 May 2022 19:48:21 +0000 (19:48 +0000)
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>

src/internal/cpu/cpu_loong64.go [new file with mode: 0644]
src/internal/goarch/goarch.go
src/internal/goarch/goarch_loong64.go [new file with mode: 0644]

diff --git a/src/internal/cpu/cpu_loong64.go b/src/internal/cpu/cpu_loong64.go
new file mode 100644 (file)
index 0000000..d8403d7
--- /dev/null
@@ -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() {}
index e8de67b01b44338474abcc1f0fe818ee05556d2d..3dda62fadc21f3c881e76b3df021c5670b953d6b 100644 (file)
@@ -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 (file)
index 0000000..dae1f4d
--- /dev/null
@@ -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
+)