1 dnl AMD64 mpn_addlshC_n -- rp[] = up[] + (vp[] << C)
2 dnl AMD64 mpn_rsblshC_n -- rp[] = (vp[] << C) - up[]
4 dnl Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
6 dnl This file is part of the GNU MP Library.
8 dnl The GNU MP Library is free software; you can redistribute it and/or modify
9 dnl it under the terms of the GNU Lesser General Public License as published
10 dnl by the Free Software Foundation; either version 3 of the License, or (at
11 dnl your option) any later version.
13 dnl The GNU MP Library is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 dnl License for more details.
18 dnl You should have received a copy of the GNU Lesser General Public License
19 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
38 define(M, eval(m4_lshift(1,LSH)))
68 L(b11): mov 8(vp,n,8), %r10
69 lea (%r8,%r10,M), %r14
72 lea (%r10,%r11,M), %r15
75 ADCSBB 8(up,n,8), %r14
76 ADCSBB 16(up,n,8), %r15
77 sbb R32(%rax), R32(%rax) C save carry for next
87 sbb R32(%rax), R32(%rax) C save carry for next
93 L(b10): mov 8(vp,n,8), %r11
94 lea (%r8,%r11,M), %r15
97 ADCSBB 8(up,n,8), %r15
98 sbb R32(%rax), R32(%rax) C save carry for next
105 L(b00): mov 8(vp,n,8), %r9
110 L(top): mov 16(vp,n,8), %r10
113 lea (%r11,%r8,M), %r12
115 L(e00): lea (%r8,%r9,M), %r13
118 lea (%r9,%r10,M), %r14
120 lea (%r10,%r11,M), %r15
122 add R32(%rax), R32(%rax) C restore carry
123 ADCSBB (up,n,8), %r12
124 ADCSBB 8(up,n,8), %r13
125 ADCSBB 16(up,n,8), %r14
126 ADCSBB 24(up,n,8), %r15
130 sbb R32(%rax), R32(%rax) C save carry for next
137 sub R32(%r11), R32(%rax)
140 add R32(%r11), R32(%rax)
141 movslq R32(%rax), %rax