Blame mpn/arm64/bdiv_dbm1c.asm
|
Packit |
5c3484 |
dnl ARM64 mpn_bdiv_dbm1c.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl Copyright 2008, 2011, 2012, 2014 Free Software Foundation, Inc.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl This file is part of the GNU MP Library.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl The GNU MP Library is free software; you can redistribute it and/or modify
|
|
Packit |
5c3484 |
dnl it under the terms of either:
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl * the GNU Lesser General Public License as published by the Free
|
|
Packit |
5c3484 |
dnl Software Foundation; either version 3 of the License, or (at your
|
|
Packit |
5c3484 |
dnl option) any later version.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl or
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl * the GNU General Public License as published by the Free Software
|
|
Packit |
5c3484 |
dnl Foundation; either version 2 of the License, or (at your option) any
|
|
Packit |
5c3484 |
dnl later version.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl or both in parallel, as here.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl The GNU MP Library is distributed in the hope that it will be useful, but
|
|
Packit |
5c3484 |
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit |
5c3484 |
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
Packit |
5c3484 |
dnl for more details.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl You should have received copies of the GNU General Public License and the
|
|
Packit |
5c3484 |
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
|
|
Packit |
5c3484 |
dnl see https://www.gnu.org/licenses/.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
include(`../config.m4')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
C cycles/limb
|
|
Packit |
5c3484 |
C Cortex-A53 ?
|
|
Packit |
5c3484 |
C Cortex-A57 ?
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`qp', `x0')
|
|
Packit |
5c3484 |
define(`up', `x1')
|
|
Packit |
5c3484 |
define(`n', `x2')
|
|
Packit |
5c3484 |
define(`bd', `x3')
|
|
Packit |
5c3484 |
define(`cy', `x4')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
ASM_START()
|
|
Packit |
5c3484 |
TEXT
|
|
Packit |
5c3484 |
ALIGN(16)
|
|
Packit |
5c3484 |
PROLOGUE(mpn_bdiv_dbm1c)
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
ands x6, n, #3
|
|
Packit |
5c3484 |
b.eq L(fi0)
|
|
Packit |
5c3484 |
cmp x6, #2
|
|
Packit |
5c3484 |
b.cc L(fi1)
|
|
Packit |
5c3484 |
b.eq L(fi2)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
L(fi3): mul x12, x5, bd
|
|
Packit |
5c3484 |
umulh x13, x5, bd
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
b L(lo3)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
L(fi0): mul x10, x5, bd
|
|
Packit |
5c3484 |
umulh x11, x5, bd
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
b L(lo0)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
L(fi1): subs n, n, #1
|
|
Packit |
5c3484 |
mul x12, x5, bd
|
|
Packit |
5c3484 |
umulh x13, x5, bd
|
|
Packit |
5c3484 |
b.ls L(wd1)
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
b L(lo1)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
L(fi2): mul x10, x5, bd
|
|
Packit |
5c3484 |
umulh x11, x5, bd
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
b L(lo2)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
L(top): ldr x5, [up], #8
|
|
Packit |
5c3484 |
subs x4, x4, x10
|
|
Packit |
5c3484 |
str x4, [qp], #8
|
|
Packit |
5c3484 |
sbc x4, x4, x11
|
|
Packit |
5c3484 |
L(lo1): mul x10, x5, bd
|
|
Packit |
5c3484 |
umulh x11, x5, bd
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
subs x4, x4, x12
|
|
Packit |
5c3484 |
str x4, [qp], #8
|
|
Packit |
5c3484 |
sbc x4, x4, x13
|
|
Packit |
5c3484 |
L(lo0): mul x12, x5, bd
|
|
Packit |
5c3484 |
umulh x13, x5, bd
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
subs x4, x4, x10
|
|
Packit |
5c3484 |
str x4, [qp], #8
|
|
Packit |
5c3484 |
sbc x4, x4, x11
|
|
Packit |
5c3484 |
L(lo3): mul x10, x5, bd
|
|
Packit |
5c3484 |
umulh x11, x5, bd
|
|
Packit |
5c3484 |
ldr x5, [up], #8
|
|
Packit |
5c3484 |
subs x4, x4, x12
|
|
Packit |
5c3484 |
str x4, [qp], #8
|
|
Packit |
5c3484 |
sbc x4, x4, x13
|
|
Packit |
5c3484 |
L(lo2): subs n, n, #4
|
|
Packit |
5c3484 |
mul x12, x5, bd
|
|
Packit |
5c3484 |
umulh x13, x5, bd
|
|
Packit |
5c3484 |
b.hi L(top)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
L(wd2): subs x4, x4, x10
|
|
Packit |
5c3484 |
str x4, [qp], #8
|
|
Packit |
5c3484 |
sbc x4, x4, x11
|
|
Packit |
5c3484 |
L(wd1): subs x4, x4, x12
|
|
Packit |
5c3484 |
str x4, [qp]
|
|
Packit |
5c3484 |
sbc x0, x4, x13
|
|
Packit |
5c3484 |
ret
|
|
Packit |
5c3484 |
EPILOGUE()
|