1 dnl AMD64 mpn_lshiftc -- mpn left shift with complement.
3 dnl Copyright 2003, 2005, 2006, 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 shr R8(%rcx), %rax C function return value
45 neg R32(%rcx) C put lsh count in cl
48 je L(rlx) C jump for n = 3, 7, 11, ...
55 neg R32(%rcx) C put rsh count in cl
65 je L(1x) C jump for n = 1, 5, 9, 13, ...
66 C n = 2, 6, 10, 16, ...
69 neg R32(%rcx) C put rsh count in cl
76 neg R32(%rcx) C put lsh count in cl
84 neg R32(%rcx) C put rsh count in cl
97 L(rll): neg R32(%rcx) C put lsh count in cl
98 L(rlx): mov -8(up,n,8), %r10
100 mov -16(up,n,8), %r11
107 C finish stuff from lsh block
108 neg R32(%rcx) C put rsh count in cl
125 C finish stuff from rsh block
126 neg R32(%rcx) C put lsh count in cl
139 mov -16(up,n,8), %r11
146 neg R32(%rcx) C put rsh count in cl
158 neg R32(%rcx) C put lsh count in cl
159 L(ast): mov (up), %r10