1 dnl SPARC T3
/T4
/T5 mpn_mod_1s_4p.
3 dnl Contributed to the GNU project by Torbjörn Granlund.
5 dnl Copyright
2013 Free Software Foundation
, Inc.
7 dnl
This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software
; you can redistribute it and/or modify
10 dnl it under the terms of
either:
12 dnl
* the GNU Lesser General
Public License as published by the Free
13 dnl Software Foundation
; either version 3 of the License, or (at your
14 dnl option
) any later version.
18 dnl
* the GNU General
Public License as published by the Free Software
19 dnl Foundation
; either version 2 of the License, or (at your option) any
22 dnl
or both
in parallel
, as here.
24 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
25 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
26 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
29 dnl You should have received copies of the GNU General
Public License
and the
30 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
31 dnl see
https://www.gnu.
org/licenses
/.
33 include(`..
/config.m4
')
47 REGISTER(%g2,#scratch)
48 REGISTER(%g3,#scratch)
49 PROLOGUE(mpn_mod_1s_4p)
67 L(b11): ldx [%i0-16], %g2
69 umulxhi(%g2, %o4, %g3)
75 umulxhi(%g2, %o3, %g3)
81 L(b00): ldx [%i0-24], %g3
83 umulxhi(%g3, %o4, %g5)
89 umulxhi(%g4, %o3, %i5)
94 umulxhi(%g2, %o2, %g3)
100 L(b01): ldx [%i0-8], %g1
105 L(b10): ldx [%i0-8], %g2
109 .L8: add %i1, -5, %g3
113 L(top): ldx [%i0-16], %i4
115 umulxhi(%i4, %o4, %i1)
118 addxc( %i1, %g0, %i4)
121 umulxhi(%i5, %o3, %i1)
123 addxc( %i4, %i1, %i5)
126 umulxhi(%g4, %o2, %i4)
128 addxc( %i5, %i4, %g4)
130 umulxhi(%g1, %o1, %i4)
132 addxc( %g4, %i4, %g5)
134 umulxhi(%g2, %o0, %g4)
136 addxc( %g4, %g5, %g2)
141 L(end): mulx %g2, %o4, %g5
142 umulxhi(%g2, %o4, %g3)
144 addxc( %g3, %g0, %g2)
152 umulxhi(%g1, %g4, %g3)
156 addxc( %g3, %g1, %g1)
163 movgeu %xcc, %g2, %g1
168 PROLOGUE(mpn_mod_1s_4p_cps)
172 call mpn_invert_limb, 0
187 umulxhi(%o0, %g2, %g3)
194 movgeu %xcc, %g3, %g1
198 umulxhi(%o0, %g1, %g3)
205 movgeu %xcc, %g3, %g2
209 umulxhi(%o0, %g2, %g3)
216 movgeu %xcc, %g3, %g1
220 umulxhi(%o0, %g1, %g2)
227 movgeu %xcc, %g2, %g3