try out arm64 inst

This commit is contained in:
emmansun 2022-01-01 20:17:57 +08:00
parent 7154c92ba2
commit 5bd003ebbe
2 changed files with 24 additions and 0 deletions

14
sm4/arm64_verify.s Normal file
View File

@ -0,0 +1,14 @@
#include "textflag.h"
// func tblAsm(in, imm, out *byte)
TEXT ·tblAsm(SB),NOSPLIT,$0
MOVD in+0(FP), R8
MOVD imm+8(FP), R9
MOVD out+16(FP), R10
VLD1 (R8), [V0.B16]
VLD1 (R9), [V1.B16]
VTBL V1.B16, [V0.B16], V2.B16
VST1 V2.B16, (R10)
RET

10
sm4/arm64_verify_test.go Normal file
View File

@ -0,0 +1,10 @@
//go:build arm64
// +build arm64
//go:noescape
func tblAsm(in, imm, out *byte)
func TestTblAsm(t *testing.T) {
in := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
}