1 ;
! HP-PA-
1.1 __mpn_submul_1
-- Multiply
a limb vector with
a limb
and
2 ;
! subtract the result from
a second limb vector.
4 ;
! Copyright
(C
) 1992, 1993, 1994 Free Software Foundation
, Inc.
6 ;
! This file is part of the GNU MP Library.
8 ;
! The GNU MP Library is free software; you can redistribute it
and/or modify
9 ;
! it under the terms of the GNU Lesser General Public License as published by
10 ;
! the Free Software Foundation; either version
2.1 of the License
, or (at your
11 ;
! option
) any later version.
13 ;
! The GNU MP Library is distributed in the hope that it will
be useful
, but
14 ;
! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 ;
! or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 ;
! License for more details.
18 ;
! You should have received
a copy of the GNU Lesser General Public License
19 ;
! along with the GNU MP Library; see the file COPYING.LIB. If
not, write to
20 ;
! the Free Software Foundation
, Inc.
, 59 Temple Place
- Suite
330, Boston
,
21 ;
! MA
02111-1307, USA.
30 ;
! This runs at
12 cycles
/limb on
a PA7000. With the used instructions
, it
31 ;
! can
not become faster due to data cache contention after
a store. On the
32 ;
! PA7100 it runs at
11 cycles
/limb
, and that can
not be improved either
,
33 ;
! since only the xmpyu does
not need the integer pipeline
, so the only
34 ;
! dual-issue we will get are addc+xmpyu. Unrolling could gain
a cycle
/limb
37 ;
! There are some ideas described in mul_1.s that applies to this code too.
39 ;
! It seems possible to make this run as fast as __mpn_addmul_1
, if we use
40 ;
! sub,>>= %r29,%r20,%r22
42 ;
! but that requires reworking the hairy software pipeline.
..
45 .export __mpn_submul_1
48 .callinfo frame=64,no_calls
53 stw %r23,-16(%r30) ;
! move s2_limb
...
54 addib
,= -1,%r24,L$just_one_limb
55 fldws
-16(%r30),%fr4 ;
! ... into fr4
56 add %r0,%r0,%r0 ;
! clear carry
61 ldw
-12(%r30),%r20 ;
! least significant limb in product
80 addib
,<> -1,%r24,L$loop