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 <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/cpu/byteorder.go b/cpu/byteorder.go
index dcbb14e..271055b 100644
--- a/cpu/byteorder.go
+++ b/cpu/byteorder.go
@@ -46,6 +46,7 @@
 	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 0000000..0f57b05
--- /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() {
+}