mirror of
https://github.com/golang/go.git
synced 2026-06-27 19:30:52 +00:00
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:
parent
879b659ae0
commit
5e45c1df65
3 changed files with 25 additions and 2 deletions
23
src/crypto/internal/fips140/check/checktest/asm_loong64.s
Normal file
23
src/crypto/internal/fips140/check/checktest/asm_loong64.s
Normal 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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue