1 /* i80386 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
2 the result to a second limb vector.
3 Copyright (C) 1992, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
4 This file is part of the GNU MP Library.
6 The GNU MP Library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Library General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or (at your
9 option) any later version.
11 The GNU MP Library is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with the GNU MP Library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 MA 02111-1307, USA. */
22 #include "asm-syntax.h"
26 #define PARMS LINKAGE+16 /* space for 4 saved regs */
28 #define S1 RES+PTR_SIZE
29 #define SIZE S1+PTR_SIZE
38 ENTRY (BP_SYM (__mpn_addmul_1))
46 movl RES(%esp), %res_ptr
47 movl S1(%esp), %s1_ptr
48 movl SIZE(%esp), %sizeP
49 movl S2LIMB(%esp), %s2_limb
50 #if __BOUNDED_POINTERS__
51 shll $2, %sizeP /* convert limbs to bytes */
52 CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP)
53 CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP)
56 leal (%res_ptr,%sizeP,4), %res_ptr
57 leal (%s1_ptr,%sizeP,4), %s1_ptr
62 movl (%s1_ptr,%sizeP,4), %eax
66 addl %eax, (%res_ptr,%sizeP,4)
81 END (BP_SYM (__mpn_addmul_1))