From 0a89baf871c43fc3110be61f935f80b4f2dcf7ce Mon Sep 17 00:00:00 2001 From: limeidan Date: Sat, 9 Apr 2022 11:40:40 +0800 Subject: [PATCH] cpu: add basic support for GOARCH=loong64 Updates golang/go#46229 Change-Id: Ibee284c742532dec798f4a5ecfe38b429825d7aa Reviewed-on: https://go-review.googlesource.com/c/sys/+/399334 Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Russ Cox --- cpu/byteorder.go | 1 + cpu/cpu_loong64.go | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 cpu/cpu_loong64.go diff --git a/cpu/byteorder.go b/cpu/byteorder.go index dcbb14ef..271055be 100644 --- a/cpu/byteorder.go +++ b/cpu/byteorder.go @@ -46,6 +46,7 @@ func hostByteOrder() byteOrder { case "386", "amd64", "amd64p32", "alpha", "arm", "arm64", + "loong64", "mipsle", "mips64le", "mips64p32le", "nios2", "ppc64le", diff --git a/cpu/cpu_loong64.go b/cpu/cpu_loong64.go new file mode 100644 index 00000000..0f57b05b --- /dev/null +++ b/cpu/cpu_loong64.go @@ -0,0 +1,13 @@ +// 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 +// +build loong64 + +package cpu + +const cacheLineSize = 64 + +func initOptions() { +}