1
dnl HP-PA 1.1 mpn_submul_1 -- Multiply a limb vector with a limb and subtract
2
dnl the result from 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 2.1 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; 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.
24
include(`../config.m4')
32
C This runs at 12 cycles/limb on a PA7000. With the used instructions, it can
33
C not become faster due to data cache contention after a store. On the PA7100
34
C it runs at 11 cycles/limb.
36
C There are some ideas described in mul_1.asm that applies to this code too.
38
C It seems possible to make this run as fast as mpn_addmul_1, if we use
39
C sub,>>= %r29,%r19,%r22
41
C but that requires reworking the hairy software pipeline...
44
PROLOGUE(mpn_submul_1)
45
C .callinfo frame=64,no_calls
49
stw %r23,-16(%r30) C move s2_limb ...
50
addib,= -1,%r24,L(just_one_limb)
51
fldws -16(%r30),%fr4 C ... into fr4
52
add %r0,%r0,%r0 C clear carry
57
ldw -12(%r30),%r19 C least significant limb in product
61
addib,= -1,%r24,L(end)
76
addib,<> -1,%r24,L(loop)
95
.label L(just_one_limb)