1 1.1 mrg dnl ARM64 mpn_sqr_diag_addlsh1. 2 1.1 mrg 3 1.1 mrg dnl Contributed to the GNU project by Torbjrn Granlund. 4 1.1 mrg 5 1.1 mrg dnl Copyright 2016, 2017 Free Software Foundation, Inc. 6 1.1 mrg 7 1.1 mrg dnl This file is part of the GNU MP Library. 8 1.1 mrg dnl 9 1.1 mrg dnl The GNU MP Library is free software; you can redistribute it and/or modify 10 1.1 mrg dnl it under the terms of either: 11 1.1 mrg dnl 12 1.1 mrg dnl * the GNU Lesser General Public License as published by the Free 13 1.1 mrg dnl Software Foundation; either version 3 of the License, or (at your 14 1.1 mrg dnl option) any later version. 15 1.1 mrg dnl 16 1.1 mrg dnl or 17 1.1 mrg dnl 18 1.1 mrg dnl * the GNU General Public License as published by the Free Software 19 1.1 mrg dnl Foundation; either version 2 of the License, or (at your option) any 20 1.1 mrg dnl later version. 21 1.1 mrg dnl 22 1.1 mrg dnl or both in parallel, as here. 23 1.1 mrg dnl 24 1.1 mrg dnl The GNU MP Library is distributed in the hope that it will be useful, but 25 1.1 mrg dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 26 1.1 mrg dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 27 1.1 mrg dnl for more details. 28 1.1 mrg dnl 29 1.1 mrg dnl You should have received copies of the GNU General Public License and the 30 1.1 mrg dnl GNU Lesser General Public License along with the GNU MP Library. If not, 31 1.1 mrg dnl see https://www.gnu.org/licenses/. 32 1.1 mrg 33 1.1 mrg include(`../config.m4') 34 1.1 mrg 35 1.1 mrg C cycles/limb 36 1.1 mrg C Cortex-A53 5.65 37 1.1 mrg C Cortex-A57 3.5 38 1.1 mrg C X-Gene 3.38 39 1.1 mrg 40 1.1 mrg changecom(blah) 41 1.1 mrg 42 1.1 mrg define(`rp', `x0') 43 1.1 mrg define(`tp', `x1') 44 1.1 mrg define(`up', `x2') 45 1.1 mrg define(`n', `x3') 46 1.1 mrg 47 1.1 mrg ASM_START() 48 1.1 mrg PROLOGUE(mpn_sqr_diag_addlsh1) 49 1.1 mrg ldr x15, [up],#8 50 1.1 mrg lsr x18, n, #1 51 1.1 mrg tbz n, #0, L(bx0) 52 1.1 mrg 53 1.1 mrg L(bx1): adds x7, xzr, xzr 54 1.1 mrg mul x12, x15, x15 55 1.1 mrg ldr x16, [up],#8 56 1.1 mrg ldp x4, x5, [tp],#16 57 1.1 mrg umulh x11, x15, x15 58 1.1 mrg b L(mid) 59 1.1 mrg 60 1.1 mrg L(bx0): adds x5, xzr, xzr 61 1.1 mrg mul x12, x15, x15 62 1.1 mrg ldr x17, [up],#16 63 1.1 mrg ldp x6, x7, [tp],#32 64 1.1 mrg umulh x11, x15, x15 65 1.1 mrg sub x18, x18, #1 66 1.1 mrg cbz x18, L(end) 67 1.1 mrg 68 1.1 mrg ALIGN(16) 69 1.1 mrg L(top): extr x9, x6, x5, #63 70 1.1 mrg mul x10, x17, x17 71 1.1 mrg ldr x16, [up,#-8] 72 1.1 mrg adcs x13, x9, x11 73 1.1 mrg ldp x4, x5, [tp,#-16] 74 1.1 mrg umulh x11, x17, x17 75 1.1 mrg extr x8, x7, x6, #63 76 1.1 mrg stp x12, x13, [rp],#16 77 1.1 mrg adcs x12, x8, x10 78 1.1 mrg L(mid): extr x9, x4, x7, #63 79 1.1 mrg mul x10, x16, x16 80 1.1 mrg ldr x17, [up],#16 81 1.1 mrg adcs x13, x9, x11 82 1.1 mrg ldp x6, x7, [tp],#32 83 1.1 mrg umulh x11, x16, x16 84 1.1 mrg extr x8, x5, x4, #63 85 1.1 mrg stp x12, x13, [rp],#16 86 1.1 mrg adcs x12, x8, x10 87 1.1 mrg sub x18, x18, #1 88 1.1 mrg cbnz x18, L(top) 89 1.1 mrg 90 1.1 mrg L(end): extr x9, x6, x5, #63 91 1.1 mrg mul x10, x17, x17 92 1.1 mrg adcs x13, x9, x11 93 1.1 mrg umulh x11, x17, x17 94 1.1 mrg extr x8, x7, x6, #63 95 1.1 mrg stp x12, x13, [rp] 96 1.1 mrg adcs x12, x8, x10 97 1.1 mrg extr x9, xzr, x7, #63 98 1.1 mrg adcs x13, x9, x11 99 1.1 mrg stp x12, x13, [rp,#16] 100 1.1 mrg 101 1.1 mrg ret 102 1.1 mrg EPILOGUE() 103