.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * ChaCha 256-bit cipher algorithm, x64 SSSE3 functions |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 Martin Willi |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <linux/linkage.h> |
---|
.. | .. |
---|
37 | 33 | * |
---|
38 | 34 | * Clobbers: %r8d, %xmm4-%xmm7 |
---|
39 | 35 | */ |
---|
40 | | -chacha_permute: |
---|
| 36 | +SYM_FUNC_START_LOCAL(chacha_permute) |
---|
41 | 37 | |
---|
42 | 38 | movdqa ROT8(%rip),%xmm4 |
---|
43 | 39 | movdqa ROT16(%rip),%xmm5 |
---|
.. | .. |
---|
112 | 108 | sub $2,%r8d |
---|
113 | 109 | jnz .Ldoubleround |
---|
114 | 110 | |
---|
115 | | - ret |
---|
116 | | -ENDPROC(chacha_permute) |
---|
| 111 | + RET |
---|
| 112 | +SYM_FUNC_END(chacha_permute) |
---|
117 | 113 | |
---|
118 | | -ENTRY(chacha_block_xor_ssse3) |
---|
| 114 | +SYM_FUNC_START(chacha_block_xor_ssse3) |
---|
119 | 115 | # %rdi: Input state matrix, s |
---|
120 | 116 | # %rsi: up to 1 data block output, o |
---|
121 | 117 | # %rdx: up to 1 data block input, i |
---|
.. | .. |
---|
170 | 166 | |
---|
171 | 167 | .Ldone: |
---|
172 | 168 | FRAME_END |
---|
173 | | - ret |
---|
| 169 | + RET |
---|
174 | 170 | |
---|
175 | 171 | .Lxorpart: |
---|
176 | 172 | # xor remaining bytes from partial register into output |
---|
.. | .. |
---|
201 | 197 | lea -8(%r10),%rsp |
---|
202 | 198 | jmp .Ldone |
---|
203 | 199 | |
---|
204 | | -ENDPROC(chacha_block_xor_ssse3) |
---|
| 200 | +SYM_FUNC_END(chacha_block_xor_ssse3) |
---|
205 | 201 | |
---|
206 | | -ENTRY(hchacha_block_ssse3) |
---|
| 202 | +SYM_FUNC_START(hchacha_block_ssse3) |
---|
207 | 203 | # %rdi: Input state matrix, s |
---|
208 | 204 | # %rsi: output (8 32-bit words) |
---|
209 | 205 | # %edx: nrounds |
---|
.. | .. |
---|
221 | 217 | movdqu %xmm3,0x10(%rsi) |
---|
222 | 218 | |
---|
223 | 219 | FRAME_END |
---|
224 | | - ret |
---|
225 | | -ENDPROC(hchacha_block_ssse3) |
---|
| 220 | + RET |
---|
| 221 | +SYM_FUNC_END(hchacha_block_ssse3) |
---|
226 | 222 | |
---|
227 | | -ENTRY(chacha_4block_xor_ssse3) |
---|
| 223 | +SYM_FUNC_START(chacha_4block_xor_ssse3) |
---|
228 | 224 | # %rdi: Input state matrix, s |
---|
229 | 225 | # %rsi: up to 4 data blocks output, o |
---|
230 | 226 | # %rdx: up to 4 data blocks input, i |
---|
.. | .. |
---|
766 | 762 | |
---|
767 | 763 | .Ldone4: |
---|
768 | 764 | lea -8(%r10),%rsp |
---|
769 | | - ret |
---|
| 765 | + RET |
---|
770 | 766 | |
---|
771 | 767 | .Lxorpart4: |
---|
772 | 768 | # xor remaining bytes from partial register into output |
---|
.. | .. |
---|
792 | 788 | |
---|
793 | 789 | jmp .Ldone4 |
---|
794 | 790 | |
---|
795 | | -ENDPROC(chacha_4block_xor_ssse3) |
---|
| 791 | +SYM_FUNC_END(chacha_4block_xor_ssse3) |
---|