From: Xiaodong Liu Date: Mon, 15 Nov 2021 12:53:47 +0000 (+0800) Subject: internal/{cpu, goarch}: add constant definition for loong64 X-Git-Tag: go1.19beta1~209 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=30b17b6f604e30327df7ea800711526201d19aff;p=gostls13.git internal/{cpu, goarch}: add constant definition for loong64 Contributors to the loong64 port are: Weining Lu Lei Wang Lingqin Gong Xiaolin Zhao Meidan Li Xiaojuan Zhai Qiyuan Pu Guoqi Chen 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 Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot --- 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 +)