Skip to content

Commit 7401cce

Browse files
committed
cpu: replace specific instructions with WORD in the function get_cpucfg on loong64
The CPUCFG instruction on loong64 was introduced in Go1.24, which caused compilation errors when using this feature in Go1.23 and earlier versions. Change-Id: I68891bbfc527194ecdafebac3398e700bfb53c2f Reviewed-on: https://go-review.googlesource.com/c/sys/+/656915 Reviewed-by: Meidan Li <limeidan@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
1 parent b8f7da6 commit 7401cce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpu/cpu_loong64.s

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// func get_cpucfg(reg uint32) uint32
88
TEXT ·get_cpucfg(SB), NOSPLIT|NOFRAME, $0
99
MOVW reg+0(FP), R5
10-
CPUCFG R5, R4
10+
// CPUCFG R5, R4 = 0x00006ca4
11+
WORD $0x00006ca4
1112
MOVW R4, ret+8(FP)
1213
RET

0 commit comments

Comments
 (0)