dnl Copyright 2012-2014 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C Cortex-A53 2
C Cortex-A57 1
C X-Gene 1.45
define(`ap', x0)
define(`n', x1)
changecom(blah)
C mp_limb_t mpn_mod_34lsub1 (mp_srcptr up, mp_size_t n)
C TODO
C * An alternative inner loop which could run at 0.722 c/l on A57:
C adds x8, x8, x2
C adcs x9, x9, x3
C ldp x2, x3, [ap, #-32]
C adcs x10, x10, x4
C adc x12, x12, xzr
C adds x8, x8, x5
C ldp x4, x5, [ap, #-16]
C sub n, n, #6
C adcs x9, x9, x6
C adcs x10, x10, x7
C ldp x6, x7, [ap], #48
C adc x12, x12, xzr
C tbz n, #63, L(top)
ASM_START()
TEXT ALIGN(32)
PROLOGUE(mpn_mod_34lsub1)
subs n, n, #3 mov x8, #0
b.lt L(le2) C n <= 2
ldp x2, x3, [ap, #0]
ldr x4, [ap, #16] add ap, ap, #24
subs n, n, #3
b.lt L(sum) C n <= 5
cmn x0, #0 C clear carry
L(top): ldp x5, x6, [ap, #0]
ldr x7, [ap, #16] add ap, ap, #24 sub n, n, #3
adcs x2, x2, x5
adcs x3, x3, x6
adcs x4, x4, x7
tbz n, #63, L(top)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.