1 dnl ARM Neon mpn_sec_tabselect.
3 dnl Contributed to the GNU project by Torbjörn Granlund.
5 dnl Copyright
2011-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
')
48 C define(`which', on stack
)
53 define
(`maskq
', `q10')
54 define
(`maskd
', `d20')
57 PROLOGUE
(mpn_sec_tabselect
)
61 vld1.32
{d30[], d31[]}, [r4
] C
4 `which
' copies
62 vmov.i32 q14, #1 C 4 copies of 1
69 mov r12, tp C preserve tp
70 veor q13, q13, q13 C 4 counter copies
74 L(top): vceq.i32 maskq, q13, q15 C compare idx copies to `which' copies
76 vadd.i32 q13
, q13
, q14
82 vst1.32
{q2,q3}, [rp
]!
83 add tp
, r12
, #
32 C restore tp
, point to next slice
95 L
(tp4
): vceq.i32 maskq
, q13
, q15
97 vadd.i32 q13
, q13
, q14
112 L
(tp2
): vceq.i32 maskd
, d26
, d30
114 vadd.i32 d26
, d26
, d28
116 add tp
, tp
, n
, lsl #
2
129 L
(tp1
): vceq.i32 maskd
, d26
, d30
130 vld1.32
{d0[0]}, [tp
]
131 vadd.i32 d26
, d26
, d28
133 add tp
, tp
, n
, lsl #
2
136 vst1.32
{d4[0]}, [rp
]