Annotation of OpenXM_contrib/gmp/mpn/pa32/lshift.asm, Revision 1.1.1.1
1.1 ohara 1: dnl HP-PA mpn_lshift -- Shift a number left.
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_lshift)
32: sh2add %r24,%r25,%r25
33: sh2add %r24,%r26,%r26
34: ldws,mb -4(0,%r25),%r22
35: subi 32,%r23,%r1
36: mtsar %r1
37: addib,= -1,%r24,L(0004)
38: vshd %r0,%r22,%r28 C compute carry out limb
39: ldws,mb -4(0,%r25),%r29
40: addib,= -1,%r24,L(0002)
41: vshd %r22,%r29,%r20
42:
43: .label L(loop)
44: ldws,mb -4(0,%r25),%r22
45: stws,mb %r20,-4(0,%r26)
46: addib,= -1,%r24,L(0003)
47: vshd %r29,%r22,%r20
48: ldws,mb -4(0,%r25),%r29
49: stws,mb %r20,-4(0,%r26)
50: addib,<> -1,%r24,L(loop)
51: vshd %r22,%r29,%r20
52:
53: .label L(0002)
54: stws,mb %r20,-4(0,%r26)
55: vshd %r29,%r0,%r20
56: bv 0(%r2)
57: stw %r20,-4(0,%r26)
58:
59: .label L(0003)
60: stws,mb %r20,-4(0,%r26)
61:
62: .label L(0004)
63: vshd %r22,%r0,%r20
64: bv 0(%r2)
65: stw %r20,-4(0,%r26)
66: EPILOGUE()
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>