Annotation of OpenXM/src/kan96xx/gmp-2.0.2/mpn/hppa/hppa1_1/pa7100/add_n.s, Revision 1.1.1.1
1.1 maekawa 1: ; HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store
2: ; sum in a third limb vector.
3: ; This is optimized for the PA7100, where is runs at 4.25 cycles/limb
4:
5: ; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
6:
7: ; This file is part of the GNU MP Library.
8:
9: ; The GNU MP Library is free software; you can redistribute it and/or modify
10: ; it under the terms of the GNU Library General Public License as published by
11: ; the Free Software Foundation; either version 2 of the License, or (at your
12: ; option) any later version.
13:
14: ; The GNU MP Library is distributed in the hope that it will be useful, but
15: ; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16: ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
17: ; License for more details.
18:
19: ; You should have received a copy of the GNU Library General Public License
20: ; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
21: ; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22: ; MA 02111-1307, USA.
23:
24:
25: ; INPUT PARAMETERS
26: ; res_ptr gr26
27: ; s1_ptr gr25
28: ; s2_ptr gr24
29: ; size gr23
30:
31: .code
32: .export __mpn_add_n
33: __mpn_add_n
34: .proc
35: .callinfo frame=0,no_calls
36: .entry
37:
38: ldws,ma 4(0,%r25),%r20
39: ldws,ma 4(0,%r24),%r19
40:
41: addib,<= -5,%r23,L$rest
42: add %r20,%r19,%r28 ; add first limbs ignoring cy
43:
44: L$loop ldws,ma 4(0,%r25),%r20
45: ldws,ma 4(0,%r24),%r19
46: stws,ma %r28,4(0,%r26)
47: addc %r20,%r19,%r28
48: ldws,ma 4(0,%r25),%r20
49: ldws,ma 4(0,%r24),%r19
50: stws,ma %r28,4(0,%r26)
51: addc %r20,%r19,%r28
52: ldws,ma 4(0,%r25),%r20
53: ldws,ma 4(0,%r24),%r19
54: stws,ma %r28,4(0,%r26)
55: addc %r20,%r19,%r28
56: ldws,ma 4(0,%r25),%r20
57: ldws,ma 4(0,%r24),%r19
58: stws,ma %r28,4(0,%r26)
59: addib,> -4,%r23,L$loop
60: addc %r20,%r19,%r28
61:
62: L$rest addib,= 4,%r23,L$end
63: nop
64: L$eloop ldws,ma 4(0,%r25),%r20
65: ldws,ma 4(0,%r24),%r19
66: stws,ma %r28,4(0,%r26)
67: addib,> -1,%r23,L$eloop
68: addc %r20,%r19,%r28
69:
70: L$end stws %r28,0(0,%r26)
71: bv 0(%r2)
72: addc %r0,%r0,%r28
73:
74: .exit
75: .procend
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>