| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * ChaCha 256-bit cipher algorithm, x64 AVX2 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> |
|---|
| .. | .. |
|---|
| 38 | 34 | |
|---|
| 39 | 35 | .text |
|---|
| 40 | 36 | |
|---|
| 41 | | -ENTRY(chacha_2block_xor_avx2) |
|---|
| 37 | +SYM_FUNC_START(chacha_2block_xor_avx2) |
|---|
| 42 | 38 | # %rdi: Input state matrix, s |
|---|
| 43 | 39 | # %rsi: up to 2 data blocks output, o |
|---|
| 44 | 40 | # %rdx: up to 2 data blocks input, i |
|---|
| .. | .. |
|---|
| 197 | 193 | |
|---|
| 198 | 194 | .Ldone2: |
|---|
| 199 | 195 | vzeroupper |
|---|
| 200 | | - ret |
|---|
| 196 | + RET |
|---|
| 201 | 197 | |
|---|
| 202 | 198 | .Lxorpart2: |
|---|
| 203 | 199 | # xor remaining bytes from partial register into output |
|---|
| .. | .. |
|---|
| 228 | 224 | lea -8(%r10),%rsp |
|---|
| 229 | 225 | jmp .Ldone2 |
|---|
| 230 | 226 | |
|---|
| 231 | | -ENDPROC(chacha_2block_xor_avx2) |
|---|
| 227 | +SYM_FUNC_END(chacha_2block_xor_avx2) |
|---|
| 232 | 228 | |
|---|
| 233 | | -ENTRY(chacha_4block_xor_avx2) |
|---|
| 229 | +SYM_FUNC_START(chacha_4block_xor_avx2) |
|---|
| 234 | 230 | # %rdi: Input state matrix, s |
|---|
| 235 | 231 | # %rsi: up to 4 data blocks output, o |
|---|
| 236 | 232 | # %rdx: up to 4 data blocks input, i |
|---|
| .. | .. |
|---|
| 502 | 498 | |
|---|
| 503 | 499 | .Ldone4: |
|---|
| 504 | 500 | vzeroupper |
|---|
| 505 | | - ret |
|---|
| 501 | + RET |
|---|
| 506 | 502 | |
|---|
| 507 | 503 | .Lxorpart4: |
|---|
| 508 | 504 | # xor remaining bytes from partial register into output |
|---|
| .. | .. |
|---|
| 533 | 529 | lea -8(%r10),%rsp |
|---|
| 534 | 530 | jmp .Ldone4 |
|---|
| 535 | 531 | |
|---|
| 536 | | -ENDPROC(chacha_4block_xor_avx2) |
|---|
| 532 | +SYM_FUNC_END(chacha_4block_xor_avx2) |
|---|
| 537 | 533 | |
|---|
| 538 | | -ENTRY(chacha_8block_xor_avx2) |
|---|
| 534 | +SYM_FUNC_START(chacha_8block_xor_avx2) |
|---|
| 539 | 535 | # %rdi: Input state matrix, s |
|---|
| 540 | 536 | # %rsi: up to 8 data blocks output, o |
|---|
| 541 | 537 | # %rdx: up to 8 data blocks input, i |
|---|
| .. | .. |
|---|
| 996 | 992 | .Ldone8: |
|---|
| 997 | 993 | vzeroupper |
|---|
| 998 | 994 | lea -8(%r10),%rsp |
|---|
| 999 | | - ret |
|---|
| 995 | + RET |
|---|
| 1000 | 996 | |
|---|
| 1001 | 997 | .Lxorpart8: |
|---|
| 1002 | 998 | # xor remaining bytes from partial register into output |
|---|
| .. | .. |
|---|
| 1022 | 1018 | |
|---|
| 1023 | 1019 | jmp .Ldone8 |
|---|
| 1024 | 1020 | |
|---|
| 1025 | | -ENDPROC(chacha_8block_xor_avx2) |
|---|
| 1021 | +SYM_FUNC_END(chacha_8block_xor_avx2) |
|---|