1 dnl ARM mpn_and_n
, mpn_andn_n. mpn_nand_n
, etc.
3 dnl Contributed to the GNU project by Torbjörn Granlund.
5 dnl Copyright
1997, 2000, 2001, 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
')
35 C cycles/limb cycles/limb
36 C and andn ior xor nand iorn nior xnor
41 C Cortex-A9 2.5-2.72 2.75-3
42 C Cortex-A15 2.25 2.75
45 C * It seems that 2.25 c/l and 2.75 c/l is possible for A9.
46 C * Debug popping issue, see comment below.
55 ifdef
(`OPERATION_and_n
',`
56 define(`func', `mpn_and_n
')
57 define(`LOGOP', `
and $1, $2, $3')')
58 ifdef
(`OPERATION_andn_n
',`
59 define(`func', `mpn_andn_n
')
60 define(`LOGOP', `bic
$1, $2, $3')')
61 ifdef
(`OPERATION_nand_n
',`
62 define(`func', `mpn_nand_n
')
63 define(`POSTOP', `mvn
$1, $1')
64 define(`LOGOP', `
and $1, $2, $3')')
65 ifdef
(`OPERATION_ior_n
',`
66 define(`func', `mpn_ior_n
')
67 define(`LOGOP', `orr
$1, $2, $3')')
68 ifdef
(`OPERATION_iorn_n
',`
69 define(`func', `mpn_iorn_n
')
70 define(`POSTOP', `mvn
$1, $1')
71 define(`LOGOP', `bic
$1, $3, $2')')
72 ifdef
(`OPERATION_nior_n
',`
73 define(`func', `mpn_nior_n
')
74 define(`POSTOP', `mvn
$1, $1')
75 define(`LOGOP', `orr
$1, $2, $3')')
76 ifdef
(`OPERATION_xor_n
',`
77 define(`func', `mpn_xor_n
')
78 define(`LOGOP', `eor
$1, $2, $3')')
79 ifdef
(`OPERATION_xnor_n
',`
80 define(`func', `mpn_xnor_n
')
81 define(`POSTOP', `mvn
$1, $1')
82 define(`LOGOP', `eor
$1, $2, $3')')
84 MULFUNC_PROLOGUE
(mpn_and_n mpn_andn_n mpn_nand_n mpn_ior_n mpn_iorn_n mpn_nior_n mpn_xor_n mpn_xnor_n
)
99 ldmia vp
!, { r10, r12 }
100 ldmia up
!, { r8, r9 }
105 stmia rp
!, { r8, r9 }
109 push { r4, r5, r6, r7 }
111 ldmia vp
!, { r8, r9, r10, r12 }
114 L
(top
): ldmia vp
!, { r8, r9, r10, r12 }
119 stmia rp
!, { r4, r5, r6, r7 }
121 ldmia up
!, { r4, r5, r6, r7 }
133 stmia rp
!, { r4, r5, r6, r7 }
135 pop { r4, r5, r6, r7 } C popping r8
-r10 here strangely fails
137 L
(rtn
): pop { r8, r9, r10 }