1
/* Intel Pentium-4 mpn_rshift -- right shift.
3
* Copyright 2001, 2002 Free Software Foundation, Inc.
5
* This file is part of Libgcrypt.
7
* Libgcrypt is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License as
9
* published by the Free Software Foundation; either version 2.1 of
10
* the License, or (at your option) any later version.
12
* Libgcrypt is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21
* Note: This code is heavily based on the GNU MP Library.
22
* Actually it's the same code with only minor changes in the
23
* way the data is stored; this is to support the abstraction
24
* of an optional secure memory allocation which may be used
25
* to avoid revealing of sensitive data due to paging etc.
30
#include "asm-syntax.h"
35
* _gcry_mpih_rshift( mpi_ptr_t wp, (sp + 4)
36
* mpi_ptr_t up, (sp + 8)
37
* mpi_size_t usize, (sp + 12)
38
* unsigned cnt) (sp + 16)
40
* P4 Willamette, Northwood: 1.75 cycles/limb
41
* P4 Prescott: 2.0 cycles/limb
46
.globl C_SYMBOL_NAME(_gcry_mpih_rshift)
47
C_SYMBOL_NAME(_gcry_mpih_rshift:)
93
leal (%ebx,%eax,4), %ebx
96
leal -4(%edx,%eax,4), %edx
117
movq (%ebx,%eax,4), %mm0
122
movd %mm0, (%edx,%eax,4)
163
jz .Lstart_src_aligned
196
jz .Lstart_dst_aligned
235
leal -12(%ebx,%eax,4), %ebx
236
leal -20(%edx,%eax,4), %edx
278
movq (%ebx,%eax,4), %mm0
284
movq %mm3, -8(%edx,%eax,4)
287
movq 8(%ebx,%eax,4), %mm3
290
movq %mm0, (%edx,%eax,4)
307
movq (%ebx,%eax,4), %mm0
313
movq %mm3, -8(%edx,%eax,4)
385
jz .Lfinish_one_unaligned
389
.Lfinish_one_unaligned:
446
jz .Lfinish_zero_unaligned
449
.Lfinish_zero_unaligned: