Lines Matching +full:4 +full:x
31 #define X(n) X ## n macro
48 * They are used to handling the last bytes which are not multiple of 4.
71 #define FOR_EACH_WORD(x) \ argument
72 x( 0); \
73 x( 1); \
74 x( 2); \
75 x( 3); \
76 x( 4); \
77 x( 5); \
78 x( 6); \
79 x( 7); \
80 x( 8); \
81 x( 9); \
82 x(10); \
83 x(11); \
84 x(12); \
85 x(13); \
86 x(14); \
87 x(15);
89 #define FOR_EACH_WORD_REV(x) \ argument
90 x(15); \
91 x(14); \
92 x(13); \
93 x(12); \
94 x(11); \
95 x(10); \
96 x( 9); \
97 x( 8); \
98 x( 7); \
99 x( 6); \
100 x( 5); \
101 x( 4); \
102 x( 3); \
103 x( 2); \
104 x( 1); \
105 x( 0);
110 #define PLUS_ONE_3 4
123 #define PLUS_ONE(x) PLUS_ONE_ ## x argument
127 #define STORE_UNALIGNED(x) \ argument
128 CONCAT3(.Lchacha_mips_xor_unaligned_, PLUS_ONE(x), _b: ;) \
129 .if (x != 12); \
130 lw T0, (x*4)(STATE); \
132 lwl T1, (x*4)+MSB ## (IN); \
133 lwr T1, (x*4)+LSB ## (IN); \
134 .if (x == 12); \
135 addu X ## x, NONCE_0; \
137 addu X ## x, T0; \
139 CPU_TO_LE32(X ## x); \
140 xor X ## x, T1; \
141 swl X ## x, (x*4)+MSB ## (OUT); \
142 swr X ## x, (x*4)+LSB ## (OUT);
144 #define STORE_ALIGNED(x) \ argument
145 CONCAT3(.Lchacha_mips_xor_aligned_, PLUS_ONE(x), _b: ;) \
146 .if (x != 12); \
147 lw T0, (x*4)(STATE); \
149 lw T1, (x*4) ## (IN); \
150 .if (x == 12); \
151 addu X ## x, NONCE_0; \
153 addu X ## x, T0; \
155 CPU_TO_LE32(X ## x); \
156 xor X ## x, T1; \
157 sw X ## x, (x*4) ## (OUT);
160 * Used for setup and handling the last bytes, which are not multiple of 4.
164 #define JMPTBL_ALIGNED(x) \ argument
165 .Lchacha_mips_jmptbl_aligned_ ## x: ; \
167 b .Lchacha_mips_xor_aligned_ ## x ## _b; \
168 .if (x == 12); \
169 addu SAVED_X, X ## x, NONCE_0; \
171 addu SAVED_X, X ## x, SAVED_CA; \
175 #define JMPTBL_UNALIGNED(x) \ argument
176 .Lchacha_mips_jmptbl_unaligned_ ## x: ; \
178 b .Lchacha_mips_xor_unaligned_ ## x ## _b; \
179 .if (x == 12); \
180 addu SAVED_X, X ## x, NONCE_0; \
182 addu SAVED_X, X ## x, SAVED_CA; \
187 addu X(A), X(K); \
188 addu X(B), X(L); \
189 addu X(C), X(M); \
190 addu X(D), X(N); \
191 xor X(V), X(A); \
192 xor X(W), X(B); \
193 xor X(Y), X(C); \
194 xor X(Z), X(D); \
195 rotl X(V), S; \
196 rotl X(W), S; \
197 rotl X(Y), S; \
198 rotl X(Z), S;
220 sw $s1, 4($sp)
236 .align 4
244 lw X1, 4(STATE)
264 AXR( 0, 1, 2, 3, 4, 5, 6, 7, 12,13,14,15, 16);
265 AXR( 8, 9,10,11, 12,13,14,15, 4, 5, 6, 7, 12);
266 AXR( 0, 1, 2, 3, 4, 5, 6, 7, 12,13,14,15, 8);
267 AXR( 8, 9,10,11, 12,13,14,15, 4, 5, 6, 7, 7);
268 AXR( 0, 1, 2, 3, 5, 6, 7, 4, 15,12,13,14, 16);
269 AXR(10,11, 8, 9, 15,12,13,14, 5, 6, 7, 4, 12);
270 AXR( 0, 1, 2, 3, 5, 6, 7, 4, 15,12,13,14, 8);
271 AXR(10,11, 8, 9, 15,12,13,14, 5, 6, 7, 4, 7);
299 lw $s1, 4($sp)
454 lw X1, 4(STATE)
472 AXR( 0, 1, 2, 3, 4, 5, 6, 7, 12,13,14,15, 16);
473 AXR( 8, 9,10,11, 12,13,14,15, 4, 5, 6, 7, 12);
474 AXR( 0, 1, 2, 3, 4, 5, 6, 7, 12,13,14,15, 8);
475 AXR( 8, 9,10,11, 12,13,14,15, 4, 5, 6, 7, 7);
476 AXR( 0, 1, 2, 3, 5, 6, 7, 4, 15,12,13,14, 16);
477 AXR(10,11, 8, 9, 15,12,13,14, 5, 6, 7, 4, 12);
478 AXR( 0, 1, 2, 3, 5, 6, 7, 4, 15,12,13,14, 8);
479 AXR(10,11, 8, 9, 15,12,13,14, 5, 6, 7, 4, 7);
486 sw X1, 4(OUT)