1 dnl PowerPC
-32 mpn_submul_1
-- Multiply a limb vector with a limb
and subtract
2 dnl the result from a second limb vector.
4 dnl Copyright
1995, 1997, 1998, 2000, 2002, 2005 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
either:
12 dnl
* the GNU Lesser General
Public License as published by the Free
13 dnl Software Foundation
; either version 3 of the License, or (at your
14 dnl option
) any later version.
18 dnl
* the GNU General
Public License as published by the Free Software
19 dnl Foundation
; either version 2 of the License, or (at your option) any
22 dnl
or both
in parallel
, as here.
24 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
25 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
26 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
29 dnl You should have received copies of the GNU General
Public License
and the
30 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
31 dnl see
https://www.gnu.
org/licenses
/.
33 include(`..
/config.m4
')
39 C 7400,7410 (G4): 9.3-15
40 C 744x,745x (G4+): 10.5
50 C This is optimized for the PPC604. See addmul_1.asm for additional comments.
53 PROLOGUE(mpn_submul_1)
54 cmpwi cr0,r5,9 C more than 9 limbs?
55 bgt cr0,L(big) C branch if more than 9 limbs
63 addc r7,r7,r8 C invert cy (r7 is junk)
75 addc r7,r7,r8 C invert cy (r7 is junk)
81 L(big): stwu r1,-16(r1)
105 adde r8,r8,r0 C add cy_limb
117 addze r0,r0 C new cy_limb
126 subfe r11,r11,r11 C invert ...
127 addic r11,r11,1 C ... carry
137 adde r8,r8,r0 C add cy_limb
140 addze r0,r0 C new cy_limb
151 EPILOGUE(mpn_submul_1)