Annotation of OpenXM_contrib/gmp/mpn/pa32/rshift.asm, Revision 1.1.1.1
1.1 ohara 1: dnl HP-PA mpn_rshift -- Shift a number right.
2:
3: dnl Copyright 1992, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
4:
5: dnl This file is part of the GNU MP Library.
6:
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 2.1 of the License, or (at
10: dnl your option) any later version.
11:
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.
16:
17: dnl You should have received a copy of the GNU Lesser General Public License
18: dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
19: dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20: dnl MA 02111-1307, USA.
21:
22: include(`../config.m4')
23:
24: C INPUT PARAMETERS
25: C res_ptr gr26
26: C s_ptr gr25
27: C size gr24
28: C cnt gr23
29:
30: ASM_START()
31: PROLOGUE(mpn_rshift)
32: ldws,ma 4(0,%r25),%r22
33: mtsar %r23
34: addib,= -1,%r24,L(0004)
35: vshd %r22,%r0,%r28 C compute carry out limb
36: ldws,ma 4(0,%r25),%r29
37: addib,= -1,%r24,L(0002)
38: vshd %r29,%r22,%r20
39:
40: .label L(loop)
41: ldws,ma 4(0,%r25),%r22
42: stws,ma %r20,4(0,%r26)
43: addib,= -1,%r24,L(0003)
44: vshd %r22,%r29,%r20
45: ldws,ma 4(0,%r25),%r29
46: stws,ma %r20,4(0,%r26)
47: addib,<> -1,%r24,L(loop)
48: vshd %r29,%r22,%r20
49:
50: .label L(0002)
51: stws,ma %r20,4(0,%r26)
52: vshd %r0,%r29,%r20
53: bv 0(%r2)
54: stw %r20,0(0,%r26)
55:
56: .label L(0003)
57: stws,ma %r20,4(0,%r26)
58:
59: .label L(0004)
60: vshd %r0,%r22,%r20
61: bv 0(%r2)
62: stw %r20,0(0,%r26)
63: EPILOGUE()
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>