1 dnl PowerPC
-64 mpn_mod_1s_4p
3 dnl Copyright
2010, 2011 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
either:
10 dnl
* the GNU Lesser General
Public License as published by the Free
11 dnl Software Foundation
; either version 3 of the License, or (at your
12 dnl option
) any later version.
16 dnl
* the GNU General
Public License as published by the Free Software
17 dnl Foundation
; either version 2 of the License, or (at your option) any
20 dnl
or both
in parallel
, as here.
22 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
23 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
24 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
27 dnl You should have received copies of the GNU General
Public License
and the
28 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
29 dnl see
https://www.gnu.
org/licenses
/.
31 include(`..
/config.m4
')
41 C * Optimise, in particular the cps function. This was compiler-generated and
42 C then hand optimised.
52 EXTERN_FUNC(mpn_invert_limb)
54 PROLOGUE(mpn_mod_1s_4p)
72 add ap, ap, r31 C make ap point at end of operand
79 L(b11): ld r11, -16(ap)
94 L(b00): ld r11, -24(ap)
120 L(b10): ld r9, -8(ap)
131 L(top): ld r31, -16(ap)
135 mulld r29, r0, r30 C rl * B4modb
136 mulhdu r0, r0, r30 C rl * B4modb
139 mulhdu r7, r9, r23 C rh * B5modb
140 mulld r9, r9, r23 C rh * B5modb
159 ifdef(`HAVE_LIMB_LITTLE_ENDIAN',
182 L
(9): cmpld cr7
, r0
, d
184 L
(10): srd r3
, r0
, r3
196 L
(16): subf r0
, d
, r0
200 PROLOGUE
(mpn_mod_1s_4p_cps
,toc
)
211 CALL( mpn_invert_limb
)
227 L
(18): mulhdu r9
, r11
, r3
235 L
(19): mulhdu r0
, r9
, r3
243 L
(20): mulhdu r8
, r0
, r3
251 L
(21): srd r0
, r0
, r31