]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.24] internal/cpu: use correct variable when parsing CPU features...
authorGuoqi Chen <chenguoqi@loongson.cn>
Thu, 6 Mar 2025 12:07:24 +0000 (20:07 +0800)
committerCherry Mui <cherryyz@google.com>
Tue, 25 Nov 2025 18:05:20 +0000 (10:05 -0800)
Fixes #76378

Change-Id: I5019f4e32243911f735f775bcb3c0dba5adb4162
Reviewed-on: https://go-review.googlesource.com/c/go/+/655395
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit bcd0ebbd2abcd3e2e876862f287c46a2de56eaab)
Reviewed-on: https://go-review.googlesource.com/c/go/+/722400
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: Mark Freeman <markfreeman@google.com>
src/internal/cpu/cpu_loong64.go

index 92583d0bca68c49dda9b94a6faf5f544fbac8819..481f8f88554591fc1562ac77fef8c123efc284d6 100644 (file)
@@ -43,8 +43,8 @@ func doinit() {
        cfg2 := get_cpucfg(2)
 
        Loong64.HasCRC32 = cfgIsSet(cfg1, cpucfg1_CRC32)
-       Loong64.HasLAMCAS = cfgIsSet(cfg2, cpucfg2_LAM_BH)
-       Loong64.HasLAM_BH = cfgIsSet(cfg2, cpucfg2_LAMCAS)
+       Loong64.HasLAMCAS = cfgIsSet(cfg2, cpucfg2_LAMCAS)
+       Loong64.HasLAM_BH = cfgIsSet(cfg2, cpucfg2_LAM_BH)
 
        osInit()
 }