1
1
dnl ARM mpn_submul_1 -- Multiply a limb vector with a limb and subtract the
2
2
dnl result from a second limb vector.
3
dnl Based on mpn_addmul_1, which was contributed by Robert Harley.
5
dnl Copyright 1998, 2000, 2001 Free Software Foundation, Inc.
4
dnl Copyright 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
7
6
dnl This file is part of the GNU MP Library.
17
16
dnl License for more details.
19
18
dnl You should have received a copy of the GNU Lesser General Public License
20
dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
21
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22
dnl MA 02111-1307, USA.
19
dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write
20
dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
dnl Boston, MA 02110-1301, USA.
24
23
include(`../config.m4')
26
C This runs at 9.75 cycles/limb in the StrongARM.
28
C Could use some register cleanup. Some fewer registers might be needed, or
29
C r11 could be utilized for better speed. Could avoid saving all registers for
30
C small (n <= 3) operands.
26
C StrongARM: 7.75-9.75 (dependent on vl value)
27
C XScale: 8-9 (dependent on vl value, estimated)
38
39
PROLOGUE(mpn_submul_1)
39
stmfd sp!, { r4-r10, lr }
40
stmfd sp!, { r4-r6, lr }
41
subs r4, r0, r0 C clear r4, set cy
53
ldmia up!, { r9, r10 }
69
ldmia up!, { r9, r10, r12, lr }
78
ldmia rp, { r6, r7, r8, lr }
86
stmia rp!, { r6, r7, r8, lr }
81
L(in): ldr ul, [up], #4
90
ldmfd sp!, { r4-r10, pc }
108
ldmfd sp!, { r4-r6, pc }
91
109
EPILOGUE(mpn_submul_1)