3 dnl Copyright
2004-2006, 2011, 2012 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
/.
31 include(`..
/config.m4
')
35 C AMD K8,K9 1.5 with fluctuations for variant 2 and 3
36 C AMD K10 1.5 with fluctuations for all variants
37 C Intel P4 2.8/3.35/3.60 (variant1/variant2/variant3)
40 C Intel SBR 1.5/1.75/1.75
44 ifdef(`OPERATION_and_n',`
45 define
(`func
',`mpn_and_n')
47 define(`LOGOP',`andq
')')
48 ifdef
(`OPERATION_andn_n
',`
49 define(`func',`mpn_andn_n
')
51 define
(`LOGOP
',`andq')')
52 ifdef(`OPERATION_nand_n',`
53 define
(`func
',`mpn_nand_n')
55 define(`LOGOP',`andq
')')
56 ifdef
(`OPERATION_ior_n
',`
57 define(`func',`mpn_ior_n
')
59 define
(`LOGOP
',`orq')')
60 ifdef(`OPERATION_iorn_n',`
61 define
(`func
',`mpn_iorn_n')
63 define(`LOGOP',`orq
')')
64 ifdef
(`OPERATION_nior_n
',`
65 define(`func',`mpn_nior_n
')
67 define
(`LOGOP
',`orq')')
68 ifdef(`OPERATION_xor_n',`
69 define
(`func
',`mpn_xor_n')
71 define(`LOGOP',`xorq
')')
72 ifdef
(`OPERATION_xnor_n
',`
73 define(`func',`mpn_xnor_n
')
75 define
(`LOGOP
',`xorq')')
78 MULFUNC_PROLOGUE(mpn_and_n mpn_andn_n mpn_nand_n mpn_ior_n mpn_iorn_n mpn_nior_n mpn_xor_n mpn_xnor_n)
97 movl R32
(%rcx
), R32
(%rax
)
108 L
(b11
): LOGOP
(up
,n
,8), %r8
114 L
(b01
): LOGOP
(up
,n
,8), %r8
119 L
(oop
): movq
(vp
,n
,8), %r8
120 L
(b00
): movq
8(vp
,n
,8), %r9
126 L
(e11
): movq
16(vp
,n
,8), %r8
127 L
(e10
): movq
24(vp
,n
,8), %r9
128 LOGOP
16(up
,n
,8), %r8
129 LOGOP
24(up
,n
,8), %r9
146 movl R32
(%rcx
), R32
(%rax
)
157 L
(b11
): LOGOP
(up
,n
,8), %r8
163 .
byte 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90
164 L
(b01
): LOGOP
(up
,n
,8), %r8
169 L
(oop
): movq
(vp
,n
,8), %r8
171 L
(b00
): movq
8(vp
,n
,8), %r9
177 L
(e11
): movq
16(vp
,n
,8), %r8
179 L
(e10
): movq
24(vp
,n
,8), %r9
181 LOGOP
16(up
,n
,8), %r8
182 LOGOP
24(up
,n
,8), %r9
198 movl R32
(%rcx
), R32
(%rax
)
209 L
(b11
): LOGOP
(up
,n
,8), %r8
216 .
byte 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90
217 L
(b01
): LOGOP
(up
,n
,8), %r8
223 L
(oop
): movq
(vp
,n
,8), %r8
224 L
(b00
): movq
8(vp
,n
,8), %r9
231 L
(e11
): movq
16(vp
,n
,8), %r8
232 L
(e10
): movq
24(vp
,n
,8), %r9
233 LOGOP
16(up
,n
,8), %r8
235 LOGOP
24(up
,n
,8), %r9