1 dnl ARM mpn_com optimised for A15.
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
')
43 C This is great A15 core register code, but it is a bit large.
44 C We use FEEDIN_VARIANT 1 to save some space, but use 8-way unrolling.
46 C Architecture requirements:
54 define(`FEEDIN_VARIANT', 1) C
alternatives: 0 1 2
55 define
(`UNROLL
', 4x2) C alternatives: 4 4x2
65 ifelse(FEEDIN_VARIANT,0,`
76 L(bx0): ldrd r4, r5, [up, #0]
81 L(b00a):ldrd r4, r5, [up], #-8
85 ifelse
(FEEDIN_VARIANT
,1,`
100 ldrd r4
, r5
, [up
], #
-8
104 ifelse(FEEDIN_VARIANT,2,`
112 L(b11): ldr r5, [up], #4
114 ldrd r4, r5, [up, #0]
118 L(b00): ldrd r4, r5, [up], #-8
122 L(b01): ldr r5, [up], #-4
127 L(gt1): ldrd r4, r5, [up, #8]
130 L(b10): ldrd r4, r5, [up]
136 L
(top
): ldrd r4
, r5
, [up
, #
8]
137 strd r8
, r9
, [rp
, #
8]
140 ldrd r4
, r5
, [up
, #
16]!
141 strd r8
, r9
, [rp
, #
16]!
149 L(top): ldrd r4, r5, [up, #8]
150 strd r8, r9, [rp, #8]
153 ldrd r4, r5, [up, #16]
154 strd r8, r9, [rp, #16]
160 ldrd r4, r5, [up, #24]
161 strd r8, r9, [rp, #24]
164 ldrd r4, r5, [up, #32]!
165 strd r8, r9, [rp, #32]!
172 L
(end): strd r8
, r9
, [rp
, #
8]
173 L
(wd1
): pop { r4-r5,r8-r9 }
176 L
(dne
): strd r8
, r9
, [rp
, #
24]