| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Cast5 Cipher 16-way parallel algorithm (AVX/x86_64) |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * <Johannes.Goetzfried@informatik.stud.uni-erlangen.de> |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Copyright © 2012 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | | - * |
|---|
| 19 | | - * You should have received a copy of the GNU General Public License |
|---|
| 20 | | - * along with this program; if not, write to the Free Software |
|---|
| 21 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
|---|
| 22 | | - * USA |
|---|
| 23 | | - * |
|---|
| 24 | 9 | */ |
|---|
| 25 | 10 | |
|---|
| 26 | 11 | #include <linux/linkage.h> |
|---|
| .. | .. |
|---|
| 224 | 209 | .text |
|---|
| 225 | 210 | |
|---|
| 226 | 211 | .align 16 |
|---|
| 227 | | -__cast5_enc_blk16: |
|---|
| 212 | +SYM_FUNC_START_LOCAL(__cast5_enc_blk16) |
|---|
| 228 | 213 | /* input: |
|---|
| 229 | 214 | * %rdi: ctx |
|---|
| 230 | 215 | * RL1: blocks 1 and 2 |
|---|
| .. | .. |
|---|
| 294 | 279 | outunpack_blocks(RR3, RL3, RTMP, RX, RKM); |
|---|
| 295 | 280 | outunpack_blocks(RR4, RL4, RTMP, RX, RKM); |
|---|
| 296 | 281 | |
|---|
| 297 | | - ret; |
|---|
| 298 | | -ENDPROC(__cast5_enc_blk16) |
|---|
| 282 | + RET; |
|---|
| 283 | +SYM_FUNC_END(__cast5_enc_blk16) |
|---|
| 299 | 284 | |
|---|
| 300 | 285 | .align 16 |
|---|
| 301 | | -__cast5_dec_blk16: |
|---|
| 286 | +SYM_FUNC_START_LOCAL(__cast5_dec_blk16) |
|---|
| 302 | 287 | /* input: |
|---|
| 303 | 288 | * %rdi: ctx |
|---|
| 304 | 289 | * RL1: encrypted blocks 1 and 2 |
|---|
| .. | .. |
|---|
| 367 | 352 | outunpack_blocks(RR3, RL3, RTMP, RX, RKM); |
|---|
| 368 | 353 | outunpack_blocks(RR4, RL4, RTMP, RX, RKM); |
|---|
| 369 | 354 | |
|---|
| 370 | | - ret; |
|---|
| 355 | + RET; |
|---|
| 371 | 356 | |
|---|
| 372 | 357 | .L__skip_dec: |
|---|
| 373 | 358 | vpsrldq $4, RKR, RKR; |
|---|
| 374 | 359 | jmp .L__dec_tail; |
|---|
| 375 | | -ENDPROC(__cast5_dec_blk16) |
|---|
| 360 | +SYM_FUNC_END(__cast5_dec_blk16) |
|---|
| 376 | 361 | |
|---|
| 377 | | -ENTRY(cast5_ecb_enc_16way) |
|---|
| 362 | +SYM_FUNC_START(cast5_ecb_enc_16way) |
|---|
| 378 | 363 | /* input: |
|---|
| 379 | 364 | * %rdi: ctx |
|---|
| 380 | 365 | * %rsi: dst |
|---|
| .. | .. |
|---|
| 408 | 393 | |
|---|
| 409 | 394 | popq %r15; |
|---|
| 410 | 395 | FRAME_END |
|---|
| 411 | | - ret; |
|---|
| 412 | | -ENDPROC(cast5_ecb_enc_16way) |
|---|
| 396 | + RET; |
|---|
| 397 | +SYM_FUNC_END(cast5_ecb_enc_16way) |
|---|
| 413 | 398 | |
|---|
| 414 | | -ENTRY(cast5_ecb_dec_16way) |
|---|
| 399 | +SYM_FUNC_START(cast5_ecb_dec_16way) |
|---|
| 415 | 400 | /* input: |
|---|
| 416 | 401 | * %rdi: ctx |
|---|
| 417 | 402 | * %rsi: dst |
|---|
| .. | .. |
|---|
| 446 | 431 | |
|---|
| 447 | 432 | popq %r15; |
|---|
| 448 | 433 | FRAME_END |
|---|
| 449 | | - ret; |
|---|
| 450 | | -ENDPROC(cast5_ecb_dec_16way) |
|---|
| 434 | + RET; |
|---|
| 435 | +SYM_FUNC_END(cast5_ecb_dec_16way) |
|---|
| 451 | 436 | |
|---|
| 452 | | -ENTRY(cast5_cbc_dec_16way) |
|---|
| 437 | +SYM_FUNC_START(cast5_cbc_dec_16way) |
|---|
| 453 | 438 | /* input: |
|---|
| 454 | 439 | * %rdi: ctx |
|---|
| 455 | 440 | * %rsi: dst |
|---|
| .. | .. |
|---|
| 498 | 483 | popq %r15; |
|---|
| 499 | 484 | popq %r12; |
|---|
| 500 | 485 | FRAME_END |
|---|
| 501 | | - ret; |
|---|
| 502 | | -ENDPROC(cast5_cbc_dec_16way) |
|---|
| 486 | + RET; |
|---|
| 487 | +SYM_FUNC_END(cast5_cbc_dec_16way) |
|---|
| 503 | 488 | |
|---|
| 504 | | -ENTRY(cast5_ctr_16way) |
|---|
| 489 | +SYM_FUNC_START(cast5_ctr_16way) |
|---|
| 505 | 490 | /* input: |
|---|
| 506 | 491 | * %rdi: ctx |
|---|
| 507 | 492 | * %rsi: dst |
|---|
| .. | .. |
|---|
| 574 | 559 | popq %r15; |
|---|
| 575 | 560 | popq %r12; |
|---|
| 576 | 561 | FRAME_END |
|---|
| 577 | | - ret; |
|---|
| 578 | | -ENDPROC(cast5_ctr_16way) |
|---|
| 562 | + RET; |
|---|
| 563 | +SYM_FUNC_END(cast5_ctr_16way) |
|---|