Annotation of OpenXM/src/kan96xx/gmp-2.0.2-ssh-2/mpn/z8000x/add_n.s, Revision 1.1.1.1
1.1 takayama 1: ! Z8000 (32 bit limb version) __mpn_add_n -- Add two limb vectors of equal,
2: ! non-zero length.
3:
4: ! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
5:
6: ! This file is part of the GNU MP Library.
7:
8: ! The GNU MP Library is free software; you can redistribute it and/or modify
9: ! it under the terms of the GNU Library General Public License as published by
10: ! the Free Software Foundation; either version 2 of the License, or (at your
11: ! option) any later version.
12:
13: ! The GNU MP Library is distributed in the hope that it will be useful, but
14: ! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15: ! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
16: ! License for more details.
17:
18: ! You should have received a copy of the GNU Library General Public License
19: ! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
20: ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21: ! MA 02111-1307, USA.
22:
23:
24: ! INPUT PARAMETERS
25: ! res_ptr r7
26: ! s1_ptr r6
27: ! s2_ptr r5
28: ! size r4
29:
30: ! If we are really crazy, we can use push to write a few result words
31: ! backwards, using push just because it is faster than reg+disp. We'd
32: ! then add 2x the number of words written to r7...
33:
34: segm
35: .text
36: even
37: global ___mpn_add_n
38: ___mpn_add_n:
39: popl rr0,@r6
40: popl rr8,@r5
41: addl rr0,rr8
42: ldl @r7,rr0
43: dec r4
44: jr eq,Lend
45: Loop: popl rr0,@r6
46: popl rr8,@r5
47: adc r1,r9
48: adc r0,r8
49: inc r7,#4
50: ldl @r7,rr0
51: dec r4
52: jr ne,Loop
53: Lend: ld r2,r4 ! use 0 already in r4
54: ld r3,r4
55: adc r2,r2
56: ret t
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>