2
* optimized for the PA7100, where it runs at 3.25 cycles/limb
4
* Copyright (C) 1992, 1994, 1998,
5
* 2001 Free Software Foundation, Inc.
7
* This file is part of GnuPG.
9
* GnuPG is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* GnuPG is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
28
* mpihelp_lshift( mpi_ptr_t wp, (gr26)
29
* mpi_ptr_t up, (gr25)
30
* mpi_size_t usize, (gr24)
31
* unsigned cnt) (gr23)
35
.export mpihelp_lshift
38
.callinfo frame=64,no_calls
43
ldws,mb -4(0,%r25),%r22
46
addib,= -1,%r24,L$0004
47
vshd %r0,%r22,%r28 ; compute carry out limb
48
ldws,mb -4(0,%r25),%r29
49
addib,<= -5,%r24,L$rest
53
ldws,mb -4(0,%r25),%r22
54
stws,mb %r20,-4(0,%r26)
56
ldws,mb -4(0,%r25),%r29
57
stws,mb %r20,-4(0,%r26)
59
ldws,mb -4(0,%r25),%r22
60
stws,mb %r20,-4(0,%r26)
62
ldws,mb -4(0,%r25),%r29
63
stws,mb %r20,-4(0,%r26)
64
addib,> -4,%r24,L$loop
71
ldws,mb -4(0,%r25),%r22
72
stws,mb %r20,-4(0,%r26)
73
addib,<= -1,%r24,L$end2
75
ldws,mb -4(0,%r25),%r29
76
stws,mb %r20,-4(0,%r26)
77
addib,> -1,%r24,L$eloop
81
stws,mb %r20,-4(0,%r26)
86
stws,mb %r20,-4(0,%r26)