1 dnl SPARC 64-bit mull -- Helper for mpn_mul_1.
3 dnl Copyright (C) 1998, 2000 Free Software Foundation, Inc.
5 dnl This file is part of the GNU MP Library.
7 dnl The GNU MP Library is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU Lesser General Public License as published
9 dnl by the Free Software Foundation; either version 2.1 of the License, or (at
10 dnl your option) any later version.
12 dnl The GNU MP Library is distributed in the hope that it will be useful, but
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 dnl License for more details.
17 dnl You should have received a copy of the GNU Lesser General Public License
18 dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
19 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20 dnl MA 02111-1307, USA.
25 sethi %hi(0xffff0000),%o0
40 dnl be,pn %icc,E(end1)
41 add %i1,4,%i1 C s1_ptr++
45 add %i1,4,%i1 C s1_ptr++
57 add %i1,4,%i1 C s1_ptr++
64 dnl be,pn %icc,E(end3)
69 add %i1,4,%i1 C s1_ptr++
70 ldx [%fp-25],%g2 C p16
74 sllx %g2,16,%g2 C align p16
76 add %g2,%g1,%g1 C add p16 to p0 (ADD1)
79 add %i0,4,%i0 C res_ptr++
85 nop C nop is cheap to nullify
92 add %i1,4,%i1 C s1_ptr++
93 add %g3,%g1,%g4 C p += cy
95 ldx [%fp-41],%g2 C p16
99 sllx %g2,16,%g2 C align p16
102 add %g2,%g1,%g1 C add p16 to p0 (ADD1)
107 add %i0,4,%i0 C res_ptr++
111 add %i1,4,%i1 C s1_ptr++
112 add %g3,%g1,%g4 C p += cy
114 ldx [%fp-25],%g2 C p16
116 ldx [%fp-17],%g1 C p0
118 sllx %g2,16,%g2 C align p16
121 add %g2,%g1,%g1 C add p16 to p0 (ADD1)
126 add %i0,4,%i0 C res_ptr++
131 add %g3,%g1,%g4 C p += cy
133 ldx [%fp-41],%g2 C p16
135 ldx [%fp-33],%g1 C p0
137 sllx %g2,16,%g2 C align p16
140 add %g2,%g1,%g1 C add p16 to p0 (ADD1)
144 add %i0,4,%i0 C res_ptr++
146 add %g3,%g1,%g4 C p += cy
148 ldx [%fp-25],%g2 C p16
149 ldx [%fp-17],%g1 C p0
150 sllx %g2,16,%g2 C align p16
162 ldx [%fp-25],%g2 C p16
163 ldx [%fp-17],%g1 C p0
164 sllx %g2,16,%g2 C align p16
165 E(yyy): add %g2,%g1,%g1 C add p16 to p0 (ADD1)
166 add %i0,4,%i0 C res_ptr++
168 add %g3,%g1,%g4 C p += cy
170 ldx [%fp-41],%g2 C p16
171 ldx [%fp-33],%g1 C p0
172 sllx %g2,16,%g2 C align p16
174 add %g2,%g1,%g1 C add p16 to p0 (ADD1)
175 add %i0,4,%i0 C res_ptr++
177 add %g3,%g1,%g4 C p += cy
182 restore %g0,%g4,%o0 C sideeffect: put cy in retreg