1 dnl AMD K7 mpn_addmul_1/mpn_submul_1 -- add or subtract mpn multiple.
3 dnl Copyright 1999, 2000, 2001, 2002, 2005, 2008 Free Software Foundation,
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
9 dnl modify it under the terms of the GNU Lesser General Public License as
10 dnl published by the Free Software Foundation; either version 3 of the
11 dnl License, or (at your option) any later version.
13 dnl The GNU MP Library is distributed in the hope that it will be useful,
14 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl Lesser General Public 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. If not, see http://www.gnu.org/licenses/.
21 include(`../config.m4')
28 C P6 model 13 (Dothan)
29 C P4 model 0 (Willamette)
31 C P4 model 2 (Northwood)
32 C P4 model 3 (Prescott)
39 C * Improve feed-in and wind-down code. We beat the old code for all n != 1,
40 C but lose by 2x for n == 1.
42 ifdef(`OPERATION_addmul_1',`
43 define(`ADDSUB', `add')
44 define(`func', `mpn_addmul_1')
46 ifdef(`OPERATION_submul_1',`
47 define(`ADDSUB', `sub')
48 define(`func', `mpn_submul_1')
51 MULFUNC_PROLOGUE(mpn_addmul_1 mpn_submul_1)
77 L(b1): lea -4(%esi), %esi
95 L(b3): lea -12(%esi), %esi
104 L(b0): lea -8(%esi), %esi
113 L(top): lea 16(%edi), %edi
133 ADDSUB %ebx, 12(%edi)
142 L(end): lea 16(%edi), %edi
147 L(cj1): ADDSUB %ebx, 4(%edi)