|
| 1 | +/* |
| 2 | + * Copyright (c) The mldsa-native project authors |
| 3 | + * SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT |
| 4 | + */ |
| 5 | + |
| 6 | + |
| 7 | +/* |
| 8 | + * WARNING: This file is auto-derived from the mldsa-native source file |
| 9 | + * dev/aarch64_opt/src/poly_use_hint_88_asm.S using scripts/simpasm. Do not modify it directly. |
| 10 | + */ |
| 11 | + |
| 12 | +.text |
| 13 | +.balign 4 |
| 14 | +#ifdef __APPLE__ |
| 15 | +.global _PQCP_MLDSA_NATIVE_MLDSA44_poly_use_hint_88_asm |
| 16 | +_PQCP_MLDSA_NATIVE_MLDSA44_poly_use_hint_88_asm: |
| 17 | +#else |
| 18 | +.global PQCP_MLDSA_NATIVE_MLDSA44_poly_use_hint_88_asm |
| 19 | +PQCP_MLDSA_NATIVE_MLDSA44_poly_use_hint_88_asm: |
| 20 | +#endif |
| 21 | + |
| 22 | + .cfi_startproc |
| 23 | + mov w4, #0xe001 // =57345 |
| 24 | + movk w4, #0x7f, lsl #16 |
| 25 | + dup v20.4s, w4 |
| 26 | + mov w5, #0x6c00 // =27648 |
| 27 | + movk w5, #0x7e, lsl #16 |
| 28 | + dup v21.4s, w5 |
| 29 | + mov w7, #0xe800 // =59392 |
| 30 | + movk w7, #0x2, lsl #16 |
| 31 | + dup v22.4s, w7 |
| 32 | + mov w11, #0x581 // =1409 |
| 33 | + movk w11, #0x5816, lsl #16 |
| 34 | + dup v23.4s, w11 |
| 35 | + movi v24.4s, #0x2b |
| 36 | + mov x3, #0x10 // =16 |
| 37 | + |
| 38 | +Lpoly_use_hint_88_loop: |
| 39 | + ldr q1, [x1, #0x10] |
| 40 | + ldr q2, [x1, #0x20] |
| 41 | + ldr q3, [x1, #0x30] |
| 42 | + ldr q0, [x1], #0x40 |
| 43 | + ldr q5, [x2, #0x10] |
| 44 | + ldr q6, [x2, #0x20] |
| 45 | + ldr q7, [x2, #0x30] |
| 46 | + ldr q4, [x2], #0x40 |
| 47 | + sqdmulh v17.4s, v1.4s, v23.4s |
| 48 | + srshr v17.4s, v17.4s, #0x11 |
| 49 | + cmgt v25.4s, v1.4s, v21.4s |
| 50 | + mls v1.4s, v17.4s, v22.4s |
| 51 | + bic v17.16b, v17.16b, v25.16b |
| 52 | + add v1.4s, v1.4s, v25.4s |
| 53 | + cmle v1.4s, v1.4s, #0 |
| 54 | + orr v1.4s, #0x1 |
| 55 | + mla v17.4s, v1.4s, v5.4s |
| 56 | + cmgt v25.4s, v17.4s, v24.4s |
| 57 | + bic v17.16b, v17.16b, v25.16b |
| 58 | + umin v17.4s, v17.4s, v24.4s |
| 59 | + sqdmulh v18.4s, v2.4s, v23.4s |
| 60 | + srshr v18.4s, v18.4s, #0x11 |
| 61 | + cmgt v25.4s, v2.4s, v21.4s |
| 62 | + mls v2.4s, v18.4s, v22.4s |
| 63 | + bic v18.16b, v18.16b, v25.16b |
| 64 | + add v2.4s, v2.4s, v25.4s |
| 65 | + cmle v2.4s, v2.4s, #0 |
| 66 | + orr v2.4s, #0x1 |
| 67 | + mla v18.4s, v2.4s, v6.4s |
| 68 | + cmgt v25.4s, v18.4s, v24.4s |
| 69 | + bic v18.16b, v18.16b, v25.16b |
| 70 | + umin v18.4s, v18.4s, v24.4s |
| 71 | + sqdmulh v19.4s, v3.4s, v23.4s |
| 72 | + srshr v19.4s, v19.4s, #0x11 |
| 73 | + cmgt v25.4s, v3.4s, v21.4s |
| 74 | + mls v3.4s, v19.4s, v22.4s |
| 75 | + bic v19.16b, v19.16b, v25.16b |
| 76 | + add v3.4s, v3.4s, v25.4s |
| 77 | + cmle v3.4s, v3.4s, #0 |
| 78 | + orr v3.4s, #0x1 |
| 79 | + mla v19.4s, v3.4s, v7.4s |
| 80 | + cmgt v25.4s, v19.4s, v24.4s |
| 81 | + bic v19.16b, v19.16b, v25.16b |
| 82 | + umin v19.4s, v19.4s, v24.4s |
| 83 | + sqdmulh v16.4s, v0.4s, v23.4s |
| 84 | + srshr v16.4s, v16.4s, #0x11 |
| 85 | + cmgt v25.4s, v0.4s, v21.4s |
| 86 | + mls v0.4s, v16.4s, v22.4s |
| 87 | + bic v16.16b, v16.16b, v25.16b |
| 88 | + add v0.4s, v0.4s, v25.4s |
| 89 | + cmle v0.4s, v0.4s, #0 |
| 90 | + orr v0.4s, #0x1 |
| 91 | + mla v16.4s, v0.4s, v4.4s |
| 92 | + cmgt v25.4s, v16.4s, v24.4s |
| 93 | + bic v16.16b, v16.16b, v25.16b |
| 94 | + umin v16.4s, v16.4s, v24.4s |
| 95 | + str q17, [x0, #0x10] |
| 96 | + str q18, [x0, #0x20] |
| 97 | + str q19, [x0, #0x30] |
| 98 | + str q16, [x0], #0x40 |
| 99 | + subs x3, x3, #0x1 |
| 100 | + b.ne Lpoly_use_hint_88_loop |
| 101 | + ret |
| 102 | + .cfi_endproc |
| 103 | + |
| 104 | +#if defined(__ELF__) |
| 105 | +.section .note.GNU-stack,"",%progbits |
| 106 | +#endif |
0 commit comments