1 dnl mpn_addmul_1 for Pentium 4 and P6 models with SSE2 (i.e., 9,D,E,F).
3 dnl Copyright 2005, 2007 Free Software Foundation, Inc.
5 dnl This file is part of the GNU MP Library.
7 dnl The GNU MP Library is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU Lesser General Public License as published
9 dnl by the Free Software Foundation; either version 3 of the License, or (at
10 dnl your option) any later version.
12 dnl The GNU MP Library is distributed in the hope that it will be useful, but
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 dnl License for more details.
17 dnl You should have received a copy of the GNU Lesser General Public License
18 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
21 include(`../config.m4')
24 C * Tweak eax/edx offsets in loop as to save some lea's
25 C * Perhaps software pipeline small-case code
28 C P6 model 0-8,10-12) -
29 C P6 model 9 (Banias) ?
30 C P6 model 13 (Dothan) 5.24
31 C P4 model 0-1 (Willamette): 5
32 C P4 model 2 (Northwood): 5
33 C P4 model 3-4 (Prescott): 5
43 PROLOGUE(mpn_addmul_1c)
52 PROLOGUE(mpn_addmul_1)
61 L(lp0): movd (%eax), %mm0
81 jmp L(3) C FIXME: one case should fall through
83 L(0): movd (%eax), %mm3
84 sub 12(%esp), %ecx C loop count
96 L(1): movd (%eax), %mm2
109 L(2): movd (%eax), %mm1
122 L(3): movd (%eax), %mm0
134 L(top): pmuludq %mm7, %mm2
141 L(10): pmuludq %mm7, %mm3
148 L(01): pmuludq %mm7, %mm0
155 L(00): pmuludq %mm7, %mm1
167 L(end): pmuludq %mm7, %mm2