1 dnl mpn_mul_1 for Pentium
4 and P6 models with SSE2
(i.e.
, 9,D
,E
,F
).
3 dnl Copyright
2005, 2007, 2011 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
either:
10 dnl
* the GNU Lesser General
Public License as published by the Free
11 dnl Software Foundation
; either version 3 of the License, or (at your
12 dnl option
) any later version.
16 dnl
* the GNU General
Public License as published by the Free Software
17 dnl Foundation
; either version 2 of the License, or (at your option) any
20 dnl
or both
in parallel
, as here.
22 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
23 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
24 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
27 dnl You should have received copies of the GNU General
Public License
and the
28 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
29 dnl see
https://www.gnu.
org/licenses
/.
32 include(`..
/config.m4
')
35 C P6 model 0-8,10-12 -
36 C P6 model 9 (Banias) 4.17
37 C P6 model 13 (Dothan) 4.17
38 C P4 model 0-1 (Willamette) 4
39 C P4 model 2 (Northwood) 4
40 C P4 model 3-4 (Prescott) 4.55
43 C * Tweak eax/edx offsets in loop as to save some lea's
44 C
* Perhaps software pipeline
small-case code
56 L
(ent
): mov 4(%esp), %edx
63 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
93 L
(1): movd
(%eax), %mm2
103 L
(2): movd
(%eax), %mm1
113 L
(3): movd
(%eax), %mm0
122 L
(top
): pmuludq
%mm7
, %mm2
127 L
(10): pmuludq
%mm7
, %mm3
132 L
(01): pmuludq
%mm7
, %mm0
137 L
(00): pmuludq
%mm7
, %mm1
147 L
(end): pmuludq
%mm7
, %mm2