1 dnl x86
-32 mpn_mod_1s_4p
, requiring cmov.
3 dnl Contributed to the GNU project by Torbjorn Granlund.
5 dnl Copyright
2009, 2010 Free Software Foundation
, Inc.
7 dnl
This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software
; you can redistribute it and/or modify
10 dnl it under the terms of
either:
12 dnl
* the GNU Lesser General
Public License as published by the Free
13 dnl Software Foundation
; either version 3 of the License, or (at your
14 dnl option
) any later version.
18 dnl
* the GNU General
Public License as published by the Free Software
19 dnl Foundation
; either version 2 of the License, or (at your option) any
22 dnl
or both
in parallel
, as here.
24 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
25 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
26 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
29 dnl You should have received copies of the GNU General
Public License
and the
30 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
31 dnl see
https://www.gnu.
org/licenses
/.
33 include(`..
/config.m4
')
37 C P6 model 0-8,10-12 ?
38 C P6 model 9 (Banias) ?
39 C P6 model 13 (Dothan) 6
40 C P4 model 0 (Willamette) ?
42 C P4 model 2 (Northwood) 15.5
43 C P4 model 3 (Prescott) ?
44 C P4 model 4 (Nocona) ?
52 PROLOGUE(mpn_mod_1s_4p)
58 mov 60(%esp), %edi C cps[]
69 mov 52(%esp), %eax C n
71 mov 48(%esp), %esi C up
72 lea -12(%esi,%eax,4), %esi
79 L(b3): mov 4(%esi), %eax
89 L(b0): mov (%esi), %eax
103 L(b1): mov 8(%esi), %ebp
107 L(b2): mov 8(%esi), %edi
113 L(top): mov (%esi), %eax
136 L(m0): add %eax, %ebp
138 L(m1): subl $4, 52(%esp)
141 L(end): mov 4(%esp), %eax
165 lea (%eax,%ebp), %edx
181 PROLOGUE(mpn_mod_1s_4p_cps)
182 C CAUTION: This is the same code as in pentium4/sse2/mod_1_4.asm
187 mov 20(%esp), %ebp C FIXME: avoid bp for 0-idx
191 sal %cl, %ebx C b << cnt
199 mov %eax, (%ebp) C store bi
200 mov %ecx, 4(%ebp) C store cnt
208 mov %esi, 8(%ebp) C store B1modb
212 lea (%edx,%ebx), %esi
220 mov %esi, 12(%ebp) C store B2modb
224 lea (%edx,%ebx), %esi
232 mov %esi, 16(%ebp) C store B3modb
236 lea (%edx,%ebx), %esi
244 mov %esi, 20(%ebp) C store B4modb
253 mov %ebx, 24(%ebp) C store B5modb