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