1 dnl ARM Neon mpn_copyd optimised for A15.
3 dnl Copyright
2013 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
')
38 C Cortex-A9 1.75 slower than core register code
53 C Copy until rp is 128-bit aligned
57 vld1.32 {d22[0]}, [up]
60 vst1.32 {d22[0]}, [rp]
67 vst1.32 {d22}, [rp:64]
68 L(al2): sub up, up, #16
69 vld1.32 {d26-d27}, [up]
71 sub rp, rp, #16 C offset rp for loop
74 sub up, up, #16 C offset up for loop
78 L(top): vld1.32 {d22-d23}, [up], r12
79 vst1.32 {d26-d27}, [rp:128], r12
80 vld1.32 {d26-d27}, [up], r12
81 vst1.32 {d22-d23}, [rp:128], r12
85 add up, up, #16 C undo up offset
86 C rp offset undoing folded
87 L(end): vst1.32 {d26-d27}, [rp:128]
89 C Copy last 0-7 limbs. Note that rp is aligned after loop, but not when we
90 C arrive here via L(bc)
94 vld1.32 {d22-d23}, [up]
96 vst1.32 {d22-d23}, [rp]
106 vld1.32 {d22[0]}, [up]
108 vst1.32 {d22[0]}, [rp]