1 dnl x86-64 mpn_addmul_1 and mpn_submul_1, optimized for "Core 2".
3 dnl Copyright 2003, 2004, 2005, 2007, 2008, 2009 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')
26 C P6 core2: 4.3-4.5 (fluctuating)
35 ifdef(`OPERATION_addmul_1',`
36 define(`ADDSUB', `add')
37 define(`func', `mpn_addmul_1')
39 ifdef(`OPERATION_submul_1',`
40 define(`ADDSUB', `sub')
41 define(`func', `mpn_submul_1')
44 MULFUNC_PROLOGUE(mpn_addmul_1 mpn_submul_1)
58 lea -16(rp,%rdx,8), rp
66 mov 8(up,%rbx,8), %rax
85 mov 8(up,%rbx,8), %rax
95 mov %r10, -8(rp,%rbx,8)
102 mov 8(up,%rbx,8), %rax
104 mov %r10, (rp,%rbx,8)
105 mov 8(rp,%rbx,8), %r10
116 L(n2): mov (rp), %r10
121 L(n1): mov 8(rp), %r10
124 mov R32(%rbx), R32(%rax) C zero rax