From: Xiaolin Zhao Date: Thu, 19 Jun 2025 13:03:27 +0000 (+0800) Subject: internal/chacha8rand: replace WORD with instruction VMOVQ X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5defe8ebb3431dc70f5aa0cc87934d7cbe3dd514;p=gostls13.git internal/chacha8rand: replace WORD with instruction VMOVQ Change-Id: I5d05af4d071b4b0ee60fafbd2a39494128bdf3f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/682896 Reviewed-by: Mark Freeman LUCI-TryBot-Result: Go LUCI Reviewed-by: abner chenc Reviewed-by: Dmitri Shuralyov --- diff --git a/src/internal/chacha8rand/chacha8_loong64.s b/src/internal/chacha8rand/chacha8_loong64.s index caa1426a05..5e6857ed3a 100644 --- a/src/internal/chacha8rand/chacha8_loong64.s +++ b/src/internal/chacha8rand/chacha8_loong64.s @@ -49,35 +49,23 @@ lsx_chacha8: MOVV $·chachaIncRot(SB), R11 // load contants - // VLDREPL.W $0, R10, V0 - WORD $0x30200140 - // VLDREPL.W $1, R10, V1 - WORD $0x30200541 - // VLDREPL.W $2, R10, V2 - WORD $0x30200942 - // VLDREPL.W $3, R10, V3 - WORD $0x30200d43 + VMOVQ (R10), V0.W4 + VMOVQ 1(R10), V1.W4 + VMOVQ 2(R10), V2.W4 + VMOVQ 3(R10), V3.W4 // load 4-32bit data from incRotMatrix added to counter VMOVQ (R11), V30 // load seed - // VLDREPL.W $0, R4, V4 - WORD $0x30200084 - // VLDREPL.W $1, R4, V5 - WORD $0x30200485 - // VLDREPL.W $2, R4, V6 - WORD $0x30200886 - // VLDREPL.W $3, R4, V7 - WORD $0x30200c87 - // VLDREPL.W $4, R4, V8 - WORD $0x30201088 - // VLDREPL.W $5, R4, V9 - WORD $0x30201489 - // VLDREPL.W $6, R4, V10 - WORD $0x3020188a - // VLDREPL.W $7, R4, V11 - WORD $0x30201c8b + VMOVQ (R4), V4.W4 + VMOVQ 1(R4), V5.W4 + VMOVQ 2(R4), V6.W4 + VMOVQ 3(R4), V7.W4 + VMOVQ 4(R4), V8.W4 + VMOVQ 5(R4), V9.W4 + VMOVQ 6(R4), V10.W4 + VMOVQ 7(R4), V11.W4 // load counter and update counter VMOVQ R6, V12.W4