1 dnl x86
-64 mpn_rshift 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 lsh count in cl
68 shl R8(%rcx), %rax C function return value
71 je L(rol) C jump for n = 3, 7, 11, ...
86 je L(1x) C jump for n = 1, 5, 9, 13, ...
87 C n = 2, 6, 10, 16, ...
100 movq 16(up,n,8), %mm3
102 movq 16(up,n,8), %mm0
103 movq 24(up,n,8), %mm1
109 movq %mm3, 16(rp,n,8)
112 L(rol): movq 8(up,n,8), %mm2
114 movq 16(up,n,8), %mm3
121 C finish stuff from lsh block
122 movq -16(up,n,8), %mm0
123 movq -8(up,n,8), %mm1
130 movq %mm2, -24(rp,n,8)
131 movq %mm3, -16(rp,n,8)
136 C finish stuff from rsh block
137 movq -8(up,n,8), %mm2
144 movq 16(up,n,8), %mm3
145 movq %mm0, -8(rp,n,8)
163 L(ast): movq (up), %mm2