1
dnl HP-PA mpn_rshift -- Shift a number right.
2
dnl Optimized for the PA7100, where is runs at 3.25 cycles/limb.
4
dnl Copyright 1992, 1994, 2000, 2001 Free Software Foundation, Inc.
6
dnl This file is part of the GNU MP Library.
8
dnl The GNU MP Library is free software; you can redistribute it and/or modify
9
dnl it under the terms of the GNU Lesser General Public License as published
10
dnl by the Free Software Foundation; either version 2.1 of the License, or (at
11
dnl your option) any later version.
13
dnl The GNU MP Library is distributed in the hope that it will be useful, but
14
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16
dnl License for more details.
18
dnl You should have received a copy of the GNU Lesser General Public License
19
dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
20
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21
dnl MA 02111-1307, USA.
23
include(`../config.m4')
33
ldws,ma 4(0,%r25),%r22
35
addib,= -1,%r24,L$0004
36
vshd %r22,%r0,%r28 C compute carry out limb
37
ldws,ma 4(0,%r25),%r29
38
addib,<= -5,%r24,L$rest
42
ldws,ma 4(0,%r25),%r22
43
stws,ma %r20,4(0,%r26)
45
ldws,ma 4(0,%r25),%r29
46
stws,ma %r20,4(0,%r26)
48
ldws,ma 4(0,%r25),%r22
49
stws,ma %r20,4(0,%r26)
51
ldws,ma 4(0,%r25),%r29
52
stws,ma %r20,4(0,%r26)
53
addib,> -4,%r24,L$loop
61
ldws,ma 4(0,%r25),%r22
62
stws,ma %r20,4(0,%r26)
63
addib,<= -1,%r24,L$end2
65
ldws,ma 4(0,%r25),%r29
66
stws,ma %r20,4(0,%r26)
67
addib,> -1,%r24,L$eloop
71
stws,ma %r20,4(0,%r26)
77
stws,ma %r20,4(0,%r26)