crypto/internal/fips140: handle static assembly symbols correctly in FIPS check

Referencing CL 631975, complete the implementation on loong64.

Change-Id: Iaf9e61f6c3c9edcd63da3978dbf86a0363d351ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/769640
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
This commit is contained in:
limeidan 2026-04-16 16:57:15 +08:00 committed by abner chenc
parent 879b659ae0
commit 5e45c1df65
3 changed files with 25 additions and 2 deletions

View file

@ -0,0 +1,23 @@
// Copyright 2026 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 !purego
#include "textflag.h"
DATA StaticData<>(SB)/4, $10
GLOBL StaticData<>(SB), NOPTR, $4
TEXT StaticText<>(SB), $0
RET
TEXT ·PtrStaticData(SB), $0-8
MOVV $StaticData<>(SB), R4
MOVV R4, ret+0(FP)
RET
TEXT ·PtrStaticText(SB), $0-8
MOVV $StaticText<>(SB), R4
MOVV R4, ret+0(FP)
RET

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build (!386 && !amd64 && !arm && !arm64) || purego
//go:build (!386 && !amd64 && !arm && !arm64 && !loong64) || purego
package checktest

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build (386 || amd64 || arm || arm64) && !purego
//go:build (386 || amd64 || arm || arm64 || loong64) && !purego
package checktest