1 dnl AMD64 mpn_rshift -- mpn right shift.
3 dnl Copyright 2003, 2005, 2009 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
8 dnl modify it under the terms of the GNU Lesser General Public License as
9 dnl published by the Free Software Foundation; either version 3 of the
10 dnl License, or (at your option) any later version.
12 dnl The GNU MP Library is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 dnl Lesser General Public License for more details.
17 dnl You should have received a copy of the GNU Lesser General Public License
18 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
20 include(`../config.m4')
41 neg R32(%rcx) C put rsh count in cl
43 shl R8(%rcx), %rax C function return value
44 neg R32(%rcx) C put lsh count in cl
53 je L(rlx) C jump for n = 3, 7, 11, ...
60 neg R32(%rcx) C put rsh count in cl
69 je L(1x) C jump for n = 1, 5, 9, 13, ...
70 C n = 2, 6, 10, 16, ...
73 neg R32(%rcx) C put rsh count in cl
79 neg R32(%rcx) C put lsh count in cl
87 neg R32(%rcx) C put rsh count in cl
98 L(rll): neg R32(%rcx) C put lsh count in cl
99 L(rlx): mov 8(up,n,8), %r10
108 C finish stuff from lsh block
109 neg R32(%rcx) C put rsh count in cl
116 mov %r10, -24(rp,n,8)
117 mov %r11, -16(rp,n,8)
124 C finish stuff from rsh block
125 neg R32(%rcx) C put lsh count in cl
143 neg R32(%rcx) C put rsh count in cl
153 neg R32(%rcx) C put lsh count in cl
154 L(ast): mov (up), %r10