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 Free Software Foundation, Inc.
6
dnl This file is part of the GNU MP Library.
8
dnl The GNU MP Library is free software; you can redistribute it and/or modify
9
dnl it under the terms of the GNU Lesser General Public License as published by
10
dnl the Free Software Foundation; either version 2.1 of the License, or (at your
11
dnl option) any later version.
13
dnl The GNU MP Library is distributed in the hope that it will be useful, but
14
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16
dnl License for more details.
18
dnl You should have received a copy of the GNU Lesser General Public License
19
dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
20
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21
dnl MA 02111-1307, USA.
30
dnl This is optimized for the PPC604. It has not been tested on PPC601, PPC603
31
dnl or PPC750 since I don't have access to any such machines.
33
include(`../config.m4')
36
PROLOGUE(mpn_submul_1)
37
cmpi cr0,r5,9 C more than 9 limbs?
38
bgt cr0,.Lbig C branch if more than 9 limbs
46
addc r7,r7,r8 C invert cy (r7 is junk)
58
addc r7,r7,r8 C invert cy (r7 is junk)
64
.Lbig: stmw r30,-32(r1)
86
adde r8,r8,r0 C add cy_limb
98
addze r0,r0 C new cy_limb
107
subfe r11,r11,r11 C invert ...
108
addic r11,r11,1 C ... carry
118
adde r8,r8,r0 C add cy_limb
121
addze r0,r0 C new cy_limb
130
EPILOGUE(mpn_submul_1)