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 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/.
20 include(`../config.m4')
23 C * Avoid indexed addressing, it makes us stall on the two-ported register
27 C P6 model 0-8,10-12) 3.17
28 C P6 model 9 (Banias) ?
29 C P6 model 13 (Dothan) 2.25
37 ifdef(`OPERATION_add_n', `
39 define(func, mpn_add_n)
40 define(func_nc, mpn_add_nc)')
41 ifdef(`OPERATION_sub_n', `
43 define(func, mpn_sub_n)
44 define(func_nc, mpn_sub_nc)')
46 MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc mpn_sub_n mpn_sub_nc)
78 lea L(ent) (%eax,%eax,2), %eax C 12x
81 shr %edx C set cy flag
86 C See mpn/x86/README about old gas bugs
87 lea (%eax,%eax,2), %eax
88 add $L(ent)-L(here), %eax
105 Zdisp( mov, 0,(up,n,4), %eax)
106 Zdisp( ADCSBB, 0,(vp,n,4), %eax)
107 Zdisp( mov, %eax, 0,(rp,n,4))
110 ADCSBB 4(vp,n,4), %edx
114 ADCSBB 8(vp,n,4), %eax
118 ADCSBB 12(vp,n,4), %edx
122 ADCSBB 16(vp,n,4), %eax
126 ADCSBB 20(vp,n,4), %edx
130 ADCSBB 24(vp,n,4), %eax
134 ADCSBB 28(vp,n,4), %edx