1 dnl Intel P6 mpn_add_n
/mpn_sub_n
-- mpn
add or subtract.
3 dnl Copyright
2006 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
')
34 C * Avoid indexed addressing, it makes us stall on the two-ported register
38 C P6 model 0-8,10-12 3.17
39 C P6 model 9 (Banias) 2.15
40 C P6 model 13 (Dothan) 2.25
48 ifdef(`OPERATION_add_n', `
50 define
(func
, mpn_add_n
)
51 define
(func_nc
, mpn_add_nc
)')
52 ifdef(`OPERATION_sub_n', `
54 define
(func
, mpn_sub_n
)
55 define
(func_nc
, mpn_sub_nc
)')
57 MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc mpn_sub_n mpn_sub_nc)
89 lea L(ent) (%eax,%eax,2), %eax C 12x
92 shr %edx C set cy flag
97 C See mpn/x86/README about old gas bugs
98 lea (%eax,%eax,2), %eax
99 add $L(ent)-L(here), %eax
116 Zdisp
( mov, 0,(up
,n
,4), %eax)
117 Zdisp
( ADCSBB
, 0,(vp
,n
,4), %eax)
118 Zdisp
( mov, %eax, 0,(rp
,n
,4))
121 ADCSBB
4(vp
,n
,4), %edx
125 ADCSBB
8(vp
,n
,4), %eax
129 ADCSBB
12(vp
,n
,4), %edx
133 ADCSBB
16(vp
,n
,4), %eax
137 ADCSBB
20(vp
,n
,4), %edx
141 ADCSBB
24(vp
,n
,4), %eax
145 ADCSBB
28(vp
,n
,4), %edx