1 dnl PowerPC-64 mpn_mul_1 -- Multiply a limb vector with a limb and store
2 dnl the result in a second limb vector.
4 dnl Copyright 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
7 dnl This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software; you can redistribute it and/or modify
10 dnl it under the terms of the GNU Lesser General Public License as published
11 dnl by the Free Software Foundation; either version 3 of the License, or (at
12 dnl your option) any later version.
14 dnl The GNU MP Library is distributed in the hope that it will be useful, but
15 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 dnl License for more details.
19 dnl You should have received a copy of the GNU Lesser General Public License
20 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
22 include(`../config.m4')
30 C * Try to reduce the number of needed live registers (at least r5 and r10
32 C * Optimize feed-in code, for speed and size.
33 C * Clean up r12/r7 usage in feed-in code.
51 li r12, 0 C cy_limb = 0
54 rldicl. r0, n, 0,62 C r0 = n & 3, set cr0
56 addic n, n, 3 C compute count...
57 srdi n, n, 2 C ...for ctr
58 mtctr n C copy count into ctr
114 L(fic): ld r26, 0(up)
115 L(b10): ld r27, 8(up)
119 L(top): mulld r0, r26, r6
152 L(end): mulld r0, r26, r6