1
/* MIPS3 addmul_1 -- Multiply a limb vector with a single limb and
2
* add the product to a second limb vector.
4
* Copyright (C) 1992, 1994, 1995, 1998, 2000
5
* 2001 Free Software Foundation, Inc.
7
* This file is part of GnuPG.
9
* GnuPG is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* GnuPG is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
27
* mpihelp_addmul_1( mpi_ptr_t res_ptr, (r4)
28
* mpi_ptr_t s1_ptr, (r5)
29
* mpi_size_t s1_size, (r6)
30
* mpi_limb_t s2_limb) (r7)
35
.globl mpihelp_addmul_1
41
/* # warm up phase 0 */
44
/* # warm up phase 1 */
54
ld $8,0($5) # load new s1 limb as early as possible
60
daddu $3,$3,$2 # add old carry limb to low product limb
62
ld $8,0($5) # load new s1 limb as early as possible
63
daddiu $6,$6,-1 # decrement loop counter
64
sltu $2,$3,$2 # carry from previous addition -> $2
71
daddu $2,$9,$2 # add high product limb and carry from addition
73
/* # cool down phase 1 */
85
daddu $2,$9,$2 # add high product limb and carry from addition
87
/* # cool down phase 0 */
98
daddu $2,$9,$2 # add high product limb and carry from addition
100
.end mpihelp_addmul_1