1 ; HP-PA __gmpn_rshift --
2 ; This is optimized for the PA7100, where is runs at 3.25 cycles/limb
4 ; Copyright (C) 1992, 1994, 2000 Free Software Foundation, Inc.
6 ; This file is part of the GNU MP Library.
8 ; The GNU MP Library is free software; you can redistribute it and/or modify
9 ; it under the terms of the GNU Lesser General Public License as published by
10 ; the Free Software Foundation; either version 2.1 of the License, or (at your
11 ; option) any later version.
13 ; The GNU MP Library is distributed in the hope that it will be useful, but
14 ; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 ; License for more details.
18 ; You should have received a copy of the GNU Lesser General Public License
19 ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
20 ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
34 .callinfo frame=64,no_calls
37 ldws,ma 4(0,%r25),%r22
39 addib,= -1,%r24,L$0004
40 vshd %r22,%r0,%r28 ; compute carry out limb
41 ldws,ma 4(0,%r25),%r29
42 addib,<= -5,%r24,L$rest
45 L$loop ldws,ma 4(0,%r25),%r22
46 stws,ma %r20,4(0,%r26)
48 ldws,ma 4(0,%r25),%r29
49 stws,ma %r20,4(0,%r26)
51 ldws,ma 4(0,%r25),%r22
52 stws,ma %r20,4(0,%r26)
54 ldws,ma 4(0,%r25),%r29
55 stws,ma %r20,4(0,%r26)
56 addib,> -4,%r24,L$loop
59 L$rest addib,= 4,%r24,L$end1
61 L$eloop 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
70 L$end1 stws,ma %r20,4(0,%r26)
74 L$end2 stws,ma %r20,4(0,%r26)
75 L$0004 vshd %r0,%r22,%r20