1 /* AMD64 __mpn_mul_1 -- Multiply a limb vector with a limb and store
2 the result in a second limb vector.
3 Copyright (C) 2003-2016 Free Software Foundation, Inc.
4 This file is part of the GNU MP Library.
6 The GNU MP Library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or (at your
9 option) any later version.
11 The GNU MP Library is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with the GNU MP Library; see the file COPYING.LIB. If not,
18 see <http://www.gnu.org/licenses/>. */
21 #include "asm-syntax.h"
33 cfi_adjust_cfa_offset (8)
34 cfi_rel_offset (%rbx, 0)
36 mov (up), %rax /* read first u limb early */
37 mov n_param, %rbx /* move away n from rdx, mul uses it */
54 L(gt1): lea 8(up,n,8), up
64 L(b0): lea (up,n,8), up
72 L(b3): lea -8(up,n,8), up
79 L(b2): lea -16(up,n,8), up
90 L(top): mov %r10, (rp,n,8)
99 L(L0): mov 8(up,n,8), %rax
104 L(L3): mov 16(up,n,8), %rax
122 L(ret): mov %rdx, %rax
125 cfi_adjust_cfa_offset (-8)