1 dnl HP-PA 2.0 mpn_lshift -- Left shift.
3 dnl Copyright 1997, 2000, 2002, 2003 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 the GNU Lesser General Public License as published
9 dnl by the Free Software Foundation; either version 3 of the License, or (at
10 dnl your option) any later version.
12 dnl The GNU MP Library is distributed in the hope that it will be useful, but
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 dnl 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/.
21 dnl This runs at 1.5 cycles/limb on PA8000 and 1.0 cycles/limb on PA8500.
23 include(`../config.m4')
31 ifdef(`HAVE_ABI_2_0w',
42 shrpd %r0, %r21, %sar, %r29 C compute carry out limb
43 depw,z n, 31, 3, %r28 C r28 = (size & 7)
45 depw,z %r22, 28, 3, %r22 C r22 = 8 * (-size & 7)
46 add up, %r22, up C offset up
47 blr %r28, %r0 C branch into jump table
48 add rp, %r22, rp C offset rp
67 LDEF(0) ldd -16(up), %r20
68 shrpd %r21, %r20, %sar, %r21
70 LDEF(7) ldd -24(up), %r21
71 shrpd %r20, %r21, %sar, %r20
73 LDEF(6) ldd -32(up), %r20
74 shrpd %r21, %r20, %sar, %r21
76 LDEF(5) ldd -40(up), %r21
77 shrpd %r20, %r21, %sar, %r20
79 LDEF(4) ldd -48(up), %r20
80 shrpd %r21, %r20, %sar, %r21
82 LDEF(3) ldd -56(up), %r21
83 shrpd %r20, %r21, %sar, %r20
85 LDEF(2) ldd -64(up), %r20
86 shrpd %r21, %r20, %sar, %r21
88 LDEF(1) ldd -72(up), %r21
90 shrpd %r20, %r21, %sar, %r20
92 addib,> -8, n, L(loop)
96 shrpd %r21, %r0, %sar, %r21
99 ifdef(`HAVE_ABI_2_0w',
101 ',` extrd,u %r29, 31, 32, %r28