3 dnl Contributed to the GNU project by Torbjörn Granlund.
5 dnl Copyright
2012 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
')
49 PROLOGUE(mpn_mod_1s_2p)
53 ldmia r7, {r7, r8, r12} C load B1, B2, B3
54 add ap, ap, n, lsl #2 C put ap at operand end
65 L(evn): ldmdb ap!, {r4,r10}
72 umlal r5, r9, r6, r7 C B1
73 umlal r5, r9, r4, r8 C B2
75 umlal r5, r9, r10, r12 C B3
78 umlal r4, r10, r6, r7 C B1
79 umlal r4, r10, r5, r8 C B2
81 umlal r4, r10, r9, r12 C B3
86 umlal r5, r9, r6, r7 C B1
87 umlal r5, r9, r4, r8 C B2
88 umlal r5, r9, r10, r12 C B3
91 L(end): movge r9, r10 C executed iff coming via xit
92 ldr r6, [r3, #4] C cps[1] = cnt
97 orr r8, r7, r4, lsr r1
101 umull r12, r1, r8, r5
115 umlal r4, r10, r6, r7 C B1
116 umlal r4, r10, r5, r8 C B2
117 umlal r4, r10, r9, r12 C B3
120 L(1): ldr r6, [r3, #4] C cps[1] = cnt
121 ldr r4, [ap, #-4] C ap[0]
126 PROLOGUE(mpn_mod_1s_2p_cps)
129 mov r5, r1, lsl r4 C b <<= cnt
130 mov r6, r0 C r6 = cps
136 orr r3, r3, r2, lsl r4
139 umull r3, r12, r2, r0
145 umull r12, r7, r1, r0
154 stmia r6, {r0,r4,r5,r7,r8} C fill cps