dnl ARM v6t2 mpn_divrem_1 and mpn_preinv_divrem_1.
dnl Contributed to the GNU project by Torbjörn Granlund.
dnl Copyright 2012 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 norm unorm frac
C StrongARM - - -
C XScale - - -
C Cortex-A7 ? ? ?
C Cortex-A8 ? ? ?
C Cortex-A9 13 14 13
C Cortex-A15 11.4 11.8 11.1
C TODO
C * Optimise inner-loops better, they could likely run a cycle or two faster.
C * Decrease register usage, streamline non-loop code.
ASM_START()
PROLOGUE(mpn_preinv_divrem_1)
stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr}
ldr d, [sp, #9*4+d_arg]
ldr cnt, [sp, #9*4+cnt_arg]
str r1, [sp, #9*4+d_arg] C reuse d stack slot for fn sub n, r3, #1 add r3, r1, n cmp d, #0 add qp, qp_arg, r3, lsl #2 C put qp at Q[] end add up, up_arg, n, lsl #2 C put up at U[] end
ldr dinv, [sp, #9*4+dinv_arg]
blt L(nent)
b L(uent)
EPILOGUE()
PROLOGUE(mpn_divrem_1)
stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} sub n, r3, #1
ldr d, [sp, #9*4+d_arg] C d
str r1, [sp, #9*4+d_arg] C reuse d stack slot for fn add r3, r1, n cmp d, #0 add qp, qp_arg, r3, lsl #2 C put qp at Q[] end add up, up_arg, n, lsl #2 C put up at U[] end
blt L(normalised)
L(unnorm):
clz cnt, d mov r0, d, lsl cnt C pass d << cnt
bl mpn_invert_limb
L(uent): mov d, d, lsl cnt C d <<= cnt cmp n, #0 mov r1, #0 C r
blt L(frac)
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.