andre@0: /* This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: andre@0: #ifndef MPI_AMD64 andre@0: #error This file only works on AMD64 platforms. andre@0: #endif andre@0: andre@0: #include andre@0: andre@0: /* andre@0: * MPI glue andre@0: * andre@0: */ andre@0: andre@0: /* Presently, this is only used by the Montgomery arithmetic code. */ andre@0: /* c += a * b */ andre@0: void MPI_ASM_DECL s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, andre@0: mp_digit b, mp_digit *c) andre@0: { andre@0: mp_digit w; andre@0: mp_digit d; andre@0: andre@0: d = s_mpv_mul_add_vec64(c, a, a_len, b); andre@0: c += a_len; andre@0: while (d) { andre@0: w = c[0] + d; andre@0: d = (w < c[0] || w < d); andre@0: *c++ = w; andre@0: } andre@0: } andre@0: