diff --git a/internal/chacha20/asm_ppc64le.s b/internal/chacha20/asm_ppc64le.s index 5441852..bc9b562 100644 --- a/internal/chacha20/asm_ppc64le.s +++ b/internal/chacha20/asm_ppc64le.s @@ -72,13 +72,13 @@ DATA consts<>+0x90(SB)/8, $0x0000000100000000 DATA consts<>+0x98(SB)/8, $0x0000000300000002 GLOBL consts<>(SB), RODATA, $0xa0 -//func chaCha20_ctr32_vsx(out, inp []byte, len int, key *[32]byte, counter *[16]byte) +//func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32) TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 MOVD out+0(FP), OUT MOVD inp+8(FP), INP MOVD len+16(FP), LEN MOVD key+24(FP), KEY - MOVD cnt+32(FP), CNT + MOVD counter+32(FP), CNT // Addressing for constants MOVD $consts<>+0x00(SB), CONSTBASE diff --git a/internal/chacha20/chacha_ppc64le.go b/internal/chacha20/chacha_ppc64le.go index d38a7d3..8d832b3 100644 --- a/internal/chacha20/chacha_ppc64le.go +++ b/internal/chacha20/chacha_ppc64le.go @@ -10,9 +10,10 @@ import ( "encoding/binary" ) -var haveAsm = true - -const bufSize = 256 +const ( + bufSize = 256 + haveAsm = true +) //go:noescape func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)