1 dnl AMD64 mpn_mod_1s_4p
3 dnl Contributed to the GNU project by Torbjorn Granlund.
5 dnl Copyright 2009 Free Software Foundation, Inc.
7 dnl This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software; you can redistribute it and/or modify
10 dnl it under the terms of the GNU Lesser General Public License as published
11 dnl by the Free Software Foundation; either version 3 of the License, or (at
12 dnl your option) any later version.
14 dnl The GNU MP Library is distributed in the hope that it will be useful, but
15 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 dnl License for more details.
19 dnl You should have received a copy of the GNU Lesser General Public License
20 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
22 include(`../config.m4')
35 PROLOGUE(mpn_mod_1s_4p)
49 xor R32(%r8), R32(%r8)
50 mov R32(%rsi), R32(%rdx)
57 L(b3): lea -24(%rdi,%rsi,8), %rdi
68 L(b0): lea -32(%rdi,%rsi,8), %rdi
83 L(b1): lea -8(%rdi,%rsi,8), %rdi
88 L(b2): lea -16(%rdi,%rsi,8), %rdi
95 L(top): mov -24(%rdi), %rax
123 L(end): mov 8(%r14), R32(%rsi)
129 xor R32(%rcx), R32(%rcx)
130 sub R32(%rsi), R32(%rcx)
133 mov R32(%rsi), R32(%rcx)
162 PROLOGUE(mpn_mod_1s_4p_cps)
168 mov R32(%rcx), R32(%r12)
173 CALL( mpn_invert_limb)
174 mov R32(%r12), R32(%rcx)
179 sub R32(%r12), R32(%rcx)
182 mov R32(%r12), R32(%rcx)
189 lea 1(%r10,%rdx), %r8
197 lea 1(%r8,%rdx), %rdi
201 lea (%rdi,%rbp), %rdx
205 lea 1(%rdi,%rdx), %rsi
209 lea (%rsi,%rbp), %rdx
213 lea 1(%rsi,%rdx), %rdx
217 lea (%rdx,%rbp), %rbp
218 movslq R32(%r12), %rax