• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/libgcrypt-1.5.1/mpi/hppa/
1/* hppa   lshift
2 *
3 *      Copyright (C) 1992, 1994, 1998
4 *                    2001, 2002 Free Software Foundation, Inc.
5 *
6 * This file is part of Libgcrypt.
7 *
8 * Libgcrypt is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * Libgcrypt is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 */
22
23
24
25/*******************
26 * mpi_limb_t
27 * _gcry_mpih_lshift( mpi_ptr_t wp,	(gr26)
28 *		   mpi_ptr_t up,	(gr25)
29 *		   mpi_size_t usize,	(gr24)
30 *		   unsigned cnt)	(gr23)
31 */
32
33	.code
34	.export 	_gcry_mpih_lshift
35	.label		_gcry_mpih_lshift
36	.proc
37	.callinfo	frame=64,no_calls
38	.entry
39
40	sh2add		%r24,%r25,%r25
41	sh2add		%r24,%r26,%r26
42	ldws,mb 	-4(0,%r25),%r22
43	subi		32,%r23,%r1
44	mtsar		%r1
45	addib,= 	-1,%r24,L$0004
46	vshd		%r0,%r22,%r28		; compute carry out limb
47	ldws,mb 	-4(0,%r25),%r29
48	addib,= 	-1,%r24,L$0002
49	vshd		%r22,%r29,%r20
50
51	.label	L$loop
52	ldws,mb 	-4(0,%r25),%r22
53	stws,mb 	%r20,-4(0,%r26)
54	addib,= 	-1,%r24,L$0003
55	vshd		%r29,%r22,%r20
56	ldws,mb 	-4(0,%r25),%r29
57	stws,mb 	%r20,-4(0,%r26)
58	addib,<>	-1,%r24,L$loop
59	vshd		%r22,%r29,%r20
60
61	.label	L$0002
62	stws,mb 	%r20,-4(0,%r26)
63	vshd		%r29,%r0,%r20
64	bv		0(%r2)
65	stw		%r20,-4(0,%r26)
66	.label	L$0003
67	stws,mb 	%r20,-4(0,%r26)
68	.label	L$0004
69	vshd		%r22,%r0,%r20
70	bv		0(%r2)
71	stw		%r20,-4(0,%r26)
72
73	.exit
74	.procend
75
76
77
78