dnl SPARC v9 32-bit mpn_addmul_1 -- Multiply a limb vector with a limb andadd
dnl the result to a second limb vector.
dnl Copyright 1998, 2000, 2001, 2003 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 Algorithm: We use two floating-point multiplies per limb product, with the
C invariant v operand split into two 16-bit pieces, and the u operand split
C into 32-bit pieces. We convert the two 48-bit products and transfer them to
C the integer unit.
C cycles/limb
C UltraSPARC 1&2: 6.5
C UltraSPARC 3: ?
C Possible optimizations:
C 1. Combine 32-bit memory operations into 64-bit operations. Since we're
C memory bandwidth limited, this could save 1.5 cycles/limb.
C 2. Unroll the inner loop. Since we already use alternate temporary areas,
C it is very straightforward to unroll, using an exit branch midways.
C Unrolling would allow deeper scheduling which could improve speed for L2
C cache case.
C 3. For mpn_mul_1: Use more alternating temp areas. The std'es and ldx'es
C aren't sufficiently apart-scheduled with just two temp areas.
C 4. Specialize for particular v values. If its upper 16 bits are zero, we
C could save many operations.
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.