Skip to content

Commit 5defe8e

Browse files
sophie-zhaoabner-chenc
authored andcommitted
internal/chacha8rand: replace WORD with instruction VMOVQ
Change-Id: I5d05af4d071b4b0ee60fafbd2a39494128bdf3f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/682896 Reviewed-by: Mark Freeman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: abner chenc <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 4c7362e commit 5defe8e

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

src/internal/chacha8rand/chacha8_loong64.s

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,35 +49,23 @@ lsx_chacha8:
4949
MOVV $·chachaIncRot(SB), R11
5050

5151
// load contants
52-
// VLDREPL.W $0, R10, V0
53-
WORD $0x30200140
54-
// VLDREPL.W $1, R10, V1
55-
WORD $0x30200541
56-
// VLDREPL.W $2, R10, V2
57-
WORD $0x30200942
58-
// VLDREPL.W $3, R10, V3
59-
WORD $0x30200d43
52+
VMOVQ (R10), V0.W4
53+
VMOVQ 1(R10), V1.W4
54+
VMOVQ 2(R10), V2.W4
55+
VMOVQ 3(R10), V3.W4
6056

6157
// load 4-32bit data from incRotMatrix added to counter
6258
VMOVQ (R11), V30
6359

6460
// load seed
65-
// VLDREPL.W $0, R4, V4
66-
WORD $0x30200084
67-
// VLDREPL.W $1, R4, V5
68-
WORD $0x30200485
69-
// VLDREPL.W $2, R4, V6
70-
WORD $0x30200886
71-
// VLDREPL.W $3, R4, V7
72-
WORD $0x30200c87
73-
// VLDREPL.W $4, R4, V8
74-
WORD $0x30201088
75-
// VLDREPL.W $5, R4, V9
76-
WORD $0x30201489
77-
// VLDREPL.W $6, R4, V10
78-
WORD $0x3020188a
79-
// VLDREPL.W $7, R4, V11
80-
WORD $0x30201c8b
61+
VMOVQ (R4), V4.W4
62+
VMOVQ 1(R4), V5.W4
63+
VMOVQ 2(R4), V6.W4
64+
VMOVQ 3(R4), V7.W4
65+
VMOVQ 4(R4), V8.W4
66+
VMOVQ 5(R4), V9.W4
67+
VMOVQ 6(R4), V10.W4
68+
VMOVQ 7(R4), V11.W4
8169

8270
// load counter and update counter
8371
VMOVQ R6, V12.W4

0 commit comments

Comments
 (0)