1 dnl x86
-64 mpn_lshift optimized for Pentium
4.
3 dnl Copyright
2003, 2005, 2007, 2008, 2012 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
either:
10 dnl
* the GNU Lesser General
Public License as published by the Free
11 dnl Software Foundation
; either version 3 of the License, or (at your
12 dnl option
) any later version.
16 dnl
* the GNU General
Public License as published by the Free Software
17 dnl Foundation
; either version 2 of the License, or (at your option) any
20 dnl
or both
in parallel
, as here.
22 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
23 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
24 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
27 dnl You should have received copies of the GNU General
Public License
and the
28 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
29 dnl see
https://www.gnu.
org/licenses
/.
31 include(`..
/config.m4
')
38 C Intel core2 2.1 (fluctuates, presumably cache related)
59 neg R32(%rcx) C put rsh count in cl
65 shr R8(%rcx), %rax C function return value
68 je L(rol) C jump for n = 3, 7, 11, ...
75 movq -16(up,n,8), %mm0
83 je L(1x) C jump for n = 1, 5, 9, 13, ...
84 C n = 2, 6, 10, 16, ...
87 movq -16(up,n,8), %mm0
97 movq -16(up,n,8), %mm3
99 movq -16(up,n,8), %mm0
100 movq -24(up,n,8), %mm1
105 movq %mm2, -8(rp,n,8)
106 movq %mm3, -16(rp,n,8)
109 L(rol): movq -8(up,n,8), %mm2
111 movq -16(up,n,8), %mm3
118 C finish stuff from lsh block
119 movq 16(up,n,8), %mm0
126 movq -8(up,n,8), %mm1
127 movq %mm2, 24(rp,n,8)
128 movq %mm3, 16(rp,n,8)
133 C finish stuff from rsh block
139 movq -8(up,n,8), %mm2
141 movq -16(up,n,8), %mm3
160 L(ast): movq (up), %mm2