4 Copyright (C) 2013 Niels Möller
6 This file is part of GNU Nettle.
8 GNU Nettle is free software: you can redistribute it and/or
9 modify it under the terms of either:
11 * the GNU Lesser General Public License as published by the Free
12 Software Foundation; either version 3 of the License, or (at your
13 option) any later version.
17 * the GNU General Public License as published by the Free
18 Software Foundation; either version 2 of the License, or (at your
19 option) any later version.
21 or both in parallel, as here.
23 GNU Nettle is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 General Public License for more details.
28 You should have received copies of the GNU General Public License and
29 the GNU Lesser General Public License along with this program. If
30 not, see http://www.gnu.org/licenses/.
33 .file "ecc-192-modp.asm"
36 define(<HP>, <r0>) C Overlaps unused modulo argument
47 define(<H0>, <T0>) C Overlaps T0 and T1
52 C ecc_192_modp (const struct ecc_modulo *m, mp_limb_t *rp)
56 PROLOGUE(nettle_ecc_192_modp)
57 push {r4,r5,r6,r7,r8,r10}
58 C Reduce two words at a time
62 ldm RP, {T2,T3,T4,T5,T6,T7}
68 C Need to add carry to T2 and T4, do T4 later.
77 C Need to add carry to T0 and T2, do T2 later
102 stm RP, {T0,T1,T2,T3,T4,T5}
104 pop {r4,r5,r6,r7,r8,r10}
106 EPILOGUE(nettle_ecc_192_modp)