1 dnl HP-PA 1.1 mpn_mul_1 -- Multiply a limb vector with a limb and store the
2 dnl result in a second limb vector.
4 dnl Copyright 1992, 1993, 1994, 2000, 2001, 2002 Free Software Foundation,
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 This runs at 9 cycles/limb on a PA7000. With the used instructions, it can
31 C not become faster due to data cache contention after a store. On the PA7100
32 C it runs at 7 cycles/limb.
34 C We could use fldds to read two limbs at a time from the S1 array, and that
35 C could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and
36 C PA7100, respectively. We don't do that since it does not seem worth the
37 C (alignment) troubles...
39 C At least the PA7100 is rumored to be able to deal with cache-misses without
40 C stalling instruction issue. If this is true, and the cache is actually also
41 C lockup-free, we should use a deeper software pipeline, and load from S1 very
42 C early! (The loads and stores to -12(sp) will surely be in the cache.)
46 C .callinfo frame=64,no_calls
50 stw %r23,-16(%r30) C move s2_limb ...
51 addib,= -1,%r24,L(just_one_limb)
52 fldws -16(%r30),%fr4 C ... into fr4
53 add %r0,%r0,%r0 C clear carry
58 ldw -12(%r30),%r19 C least significant limb in product
62 addib,= -1,%r24,L(end)
73 addib,<> -1,%r24,L(loop)