Annotation of OpenXM/src/kan96xx/gmp-2.0.2/mpn/a29k/mul_1.s, Revision 1.1.1.1
1.1 maekawa 1: ; 29000 __mpn_mul_1 -- Multiply a limb vector with a single limb and
2: ; store the product in a second limb vector.
3:
4: ; Copyright (C) 1992, 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 lr2
26: ; s1_ptr lr3
27: ; size lr4
28: ; s2_limb lr5
29:
30: .cputype 29050
31: .sect .lit,lit
32: .text
33: .align 4
34: .global ___mpn_mul_1
35: .word 0x60000
36: ___mpn_mul_1:
37: sub lr4,lr4,8
38: jmpt lr4,Ltail
39: const gr120,0 ; init cylimb reg
40:
41: srl gr117,lr4,3 ; divide by 8
42: sub gr117,gr117,1 ; count for jmpfdec
43:
44: Loop: mtsrim cr,(8-1)
45: loadm 0,0,gr96,lr3
46: add lr3,lr3,32
47:
48: multiplu gr104,gr96,lr5
49: multmu gr96,gr96,lr5
50: multiplu gr105,gr97,lr5
51: multmu gr97,gr97,lr5
52: multiplu gr106,gr98,lr5
53: multmu gr98,gr98,lr5
54: multiplu gr107,gr99,lr5
55: multmu gr99,gr99,lr5
56: multiplu gr108,gr100,lr5
57: multmu gr100,gr100,lr5
58: multiplu gr109,gr101,lr5
59: multmu gr101,gr101,lr5
60: multiplu gr110,gr102,lr5
61: multmu gr102,gr102,lr5
62: multiplu gr111,gr103,lr5
63: multmu gr103,gr103,lr5
64:
65: add gr104,gr104,gr120
66: addc gr105,gr105,gr96
67: addc gr106,gr106,gr97
68: addc gr107,gr107,gr98
69: addc gr108,gr108,gr99
70: addc gr109,gr109,gr100
71: addc gr110,gr110,gr101
72: addc gr111,gr111,gr102
73: addc gr120,gr103,0
74:
75: mtsrim cr,(8-1)
76: storem 0,0,gr104,lr2
77: jmpfdec gr117,Loop
78: add lr2,lr2,32
79:
80: Ltail: and lr4,lr4,(8-1)
81: sub gr118,lr4,1 ; count for CR
82: jmpt gr118,Lend
83: sub lr4,lr4,2
84: sub lr2,lr2,4 ; offset res_ptr by one limb
85:
86: Loop2: load 0,0,gr116,lr3
87: add lr3,lr3,4
88: multiplu gr117,gr116,lr5
89: multmu gr118,gr116,lr5
90: add lr2,lr2,4
91: add gr117,gr117,gr120
92: store 0,0,gr117,lr2
93: jmpfdec lr4,Loop2
94: addc gr120,gr118,0
95:
96: Lend: jmpi lr0
97: or gr96,gr120,0 ; copy
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>