1 1.1 mrg dnl ARM64 mpn_bdiv_dbm1c. 2 1.1 mrg 3 1.1 mrg dnl Copyright 2008, 2011, 2012, 2014 Free Software Foundation, Inc. 4 1.1 mrg 5 1.1 mrg dnl This file is part of the GNU MP Library. 6 1.1 mrg dnl 7 1.1 mrg dnl The GNU MP Library is free software; you can redistribute it and/or modify 8 1.1 mrg dnl it under the terms of either: 9 1.1 mrg dnl 10 1.1 mrg dnl * the GNU Lesser General Public License as published by the Free 11 1.1 mrg dnl Software Foundation; either version 3 of the License, or (at your 12 1.1 mrg dnl option) any later version. 13 1.1 mrg dnl 14 1.1 mrg dnl or 15 1.1 mrg dnl 16 1.1 mrg dnl * the GNU General Public License as published by the Free Software 17 1.1 mrg dnl Foundation; either version 2 of the License, or (at your option) any 18 1.1 mrg dnl later version. 19 1.1 mrg dnl 20 1.1 mrg dnl or both in parallel, as here. 21 1.1 mrg dnl 22 1.1 mrg dnl The GNU MP Library is distributed in the hope that it will be useful, but 23 1.1 mrg dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 24 1.1 mrg dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 25 1.1 mrg dnl for more details. 26 1.1 mrg dnl 27 1.1 mrg dnl You should have received copies of the GNU General Public License and the 28 1.1 mrg dnl GNU Lesser General Public License along with the GNU MP Library. If not, 29 1.1 mrg dnl see https://www.gnu.org/licenses/. 30 1.1 mrg 31 1.1 mrg include(`../config.m4') 32 1.1 mrg 33 1.1 mrg C cycles/limb 34 1.1.1.2 mrg C Cortex-A53 8 35 1.1.1.2 mrg C Cortex-A57 7 36 1.1.1.2 mrg C X-Gene 4.25 37 1.1 mrg 38 1.1 mrg define(`qp', `x0') 39 1.1 mrg define(`up', `x1') 40 1.1 mrg define(`n', `x2') 41 1.1 mrg define(`bd', `x3') 42 1.1 mrg define(`cy', `x4') 43 1.1 mrg 44 1.1 mrg ASM_START() 45 1.1 mrg TEXT 46 1.1 mrg ALIGN(16) 47 1.1 mrg PROLOGUE(mpn_bdiv_dbm1c) 48 1.1 mrg ldr x5, [up], #8 49 1.1 mrg ands x6, n, #3 50 1.1 mrg b.eq L(fi0) 51 1.1 mrg cmp x6, #2 52 1.1 mrg b.cc L(fi1) 53 1.1 mrg b.eq L(fi2) 54 1.1 mrg 55 1.1 mrg L(fi3): mul x12, x5, bd 56 1.1 mrg umulh x13, x5, bd 57 1.1 mrg ldr x5, [up], #8 58 1.1 mrg b L(lo3) 59 1.1 mrg 60 1.1 mrg L(fi0): mul x10, x5, bd 61 1.1 mrg umulh x11, x5, bd 62 1.1 mrg ldr x5, [up], #8 63 1.1 mrg b L(lo0) 64 1.1 mrg 65 1.1 mrg L(fi1): subs n, n, #1 66 1.1 mrg mul x12, x5, bd 67 1.1 mrg umulh x13, x5, bd 68 1.1 mrg b.ls L(wd1) 69 1.1 mrg ldr x5, [up], #8 70 1.1 mrg b L(lo1) 71 1.1 mrg 72 1.1 mrg L(fi2): mul x10, x5, bd 73 1.1 mrg umulh x11, x5, bd 74 1.1 mrg ldr x5, [up], #8 75 1.1 mrg b L(lo2) 76 1.1 mrg 77 1.1 mrg L(top): ldr x5, [up], #8 78 1.1 mrg subs x4, x4, x10 79 1.1 mrg str x4, [qp], #8 80 1.1 mrg sbc x4, x4, x11 81 1.1 mrg L(lo1): mul x10, x5, bd 82 1.1 mrg umulh x11, x5, bd 83 1.1 mrg ldr x5, [up], #8 84 1.1 mrg subs x4, x4, x12 85 1.1 mrg str x4, [qp], #8 86 1.1 mrg sbc x4, x4, x13 87 1.1 mrg L(lo0): mul x12, x5, bd 88 1.1 mrg umulh x13, x5, bd 89 1.1 mrg ldr x5, [up], #8 90 1.1 mrg subs x4, x4, x10 91 1.1 mrg str x4, [qp], #8 92 1.1 mrg sbc x4, x4, x11 93 1.1 mrg L(lo3): mul x10, x5, bd 94 1.1 mrg umulh x11, x5, bd 95 1.1 mrg ldr x5, [up], #8 96 1.1 mrg subs x4, x4, x12 97 1.1 mrg str x4, [qp], #8 98 1.1 mrg sbc x4, x4, x13 99 1.1 mrg L(lo2): subs n, n, #4 100 1.1 mrg mul x12, x5, bd 101 1.1 mrg umulh x13, x5, bd 102 1.1 mrg b.hi L(top) 103 1.1 mrg 104 1.1 mrg L(wd2): subs x4, x4, x10 105 1.1 mrg str x4, [qp], #8 106 1.1 mrg sbc x4, x4, x11 107 1.1 mrg L(wd1): subs x4, x4, x12 108 1.1 mrg str x4, [qp] 109 1.1 mrg sbc x0, x4, x13 110 1.1 mrg ret 111 1.1 mrg EPILOGUE() 112